Skip to content
Snippets Groups Projects
Commit 433d88c7 authored by Alice Russell's avatar Alice Russell
Browse files

Re #28047 Fix crash when remove function and closing interface

parent be264d0e
No related merge requests found
...@@ -12,5 +12,6 @@ Bugfixes ...@@ -12,5 +12,6 @@ Bugfixes
######## ########
- The Show Instruments right click menu option is now disabled for workspaces that have had their spectrum axis converted to another axis using :ref:`ConvertSpectrumAxis <algm-ConvertSpectrumAxis>`. Once this axis has been converetd the workspace loses it's link between the data values and the detectors they were recorded on so we cannot display it in the instrument view. - The Show Instruments right click menu option is now disabled for workspaces that have had their spectrum axis converted to another axis using :ref:`ConvertSpectrumAxis <algm-ConvertSpectrumAxis>`. Once this axis has been converetd the workspace loses it's link between the data values and the detectors they were recorded on so we cannot display it in the instrument view.
- Fixed an issue with Workspace History where unrolling consecutive workflow algorithms would result in only one of the algorithms being unrolled. - Fixed an issue with Workspace History where unrolling consecutive workflow algorithms would result in only one of the algorithms being unrolled.
- Fixed an issue where mantid crashed if you cleared the functions in the multi-dataset fitting interface
:ref:`Release 4.3.0 <v4.3.0>` :ref:`Release 4.3.0 <v4.3.0>`
\ No newline at end of file
...@@ -307,7 +307,9 @@ void FitOptionsBrowser::createSequentialFitProperties() { ...@@ -307,7 +307,9 @@ void FitOptionsBrowser::createSequentialFitProperties() {
// Create LogValue property // Create LogValue property
m_plotParameter = m_enumManager->addProperty("Plot parameter"); m_plotParameter = m_enumManager->addProperty("Plot parameter");
{ {
m_propertyNameMap["PlotParameter"] = m_plotParameter; addProperty("PlotParameter", m_plotParameter,
&FitOptionsBrowser::getStringEnumProperty,
&FitOptionsBrowser::setStringEnumProperty);
m_sequentialProperties << m_plotParameter; m_sequentialProperties << m_plotParameter;
} }
} }
......
...@@ -184,9 +184,11 @@ void FunctionModel::setParameterTie(const QString &parName, QString tie) { ...@@ -184,9 +184,11 @@ void FunctionModel::setParameterTie(const QString &parName, QString tie) {
QStringList FunctionModel::getParameterNames() const { QStringList FunctionModel::getParameterNames() const {
QStringList names; QStringList names;
const auto paramNames = getCurrentFunction()->getParameterNames(); if (hasFunction()) {
for (auto const name : paramNames) { const auto paramNames = getCurrentFunction()->getParameterNames();
names << QString::fromStdString(name); for (auto const name : paramNames) {
names << QString::fromStdString(name);
}
} }
return names; return names;
} }
...@@ -398,7 +400,7 @@ void FunctionModel::setGlobalParameters(const QStringList &globals) { ...@@ -398,7 +400,7 @@ void FunctionModel::setGlobalParameters(const QStringList &globals) {
QStringList FunctionModel::getLocalParameters() const { QStringList FunctionModel::getLocalParameters() const {
QStringList locals; QStringList locals;
for (auto const name : getParameterNames()) { for (auto const &name : getParameterNames()) {
if (!m_globalParameterNames.contains(name)) if (!m_globalParameterNames.contains(name))
locals << name; locals << name;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment