diff --git a/docs/source/release/v4.3.0/mantidplot.rst b/docs/source/release/v4.3.0/mantidplot.rst index d21ddc12ef46437546fa32b47541ef8e55c45992..807ce2d1ee00673a9da19beaebda60af6dbd15d9 100644 --- a/docs/source/release/v4.3.0/mantidplot.rst +++ b/docs/source/release/v4.3.0/mantidplot.rst @@ -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. - 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>` \ No newline at end of file diff --git a/qt/widgets/common/src/FitOptionsBrowser.cpp b/qt/widgets/common/src/FitOptionsBrowser.cpp index c8c38146a74781b2f9882c6bcfb4dd87d8e8c4dc..67b9e82bbfa5764af27efa3a0e92811c2c236847 100644 --- a/qt/widgets/common/src/FitOptionsBrowser.cpp +++ b/qt/widgets/common/src/FitOptionsBrowser.cpp @@ -307,7 +307,9 @@ void FitOptionsBrowser::createSequentialFitProperties() { // Create LogValue property m_plotParameter = m_enumManager->addProperty("Plot parameter"); { - m_propertyNameMap["PlotParameter"] = m_plotParameter; + addProperty("PlotParameter", m_plotParameter, + &FitOptionsBrowser::getStringEnumProperty, + &FitOptionsBrowser::setStringEnumProperty); m_sequentialProperties << m_plotParameter; } } diff --git a/qt/widgets/common/src/FunctionModel.cpp b/qt/widgets/common/src/FunctionModel.cpp index 83afaff53010a825646141f3d2e97d37eb9a3fd2..4fb5ae720c8f96218bb34bc4441a0894bcb6eae4 100644 --- a/qt/widgets/common/src/FunctionModel.cpp +++ b/qt/widgets/common/src/FunctionModel.cpp @@ -184,9 +184,11 @@ void FunctionModel::setParameterTie(const QString &parName, QString tie) { QStringList FunctionModel::getParameterNames() const { QStringList names; - const auto paramNames = getCurrentFunction()->getParameterNames(); - for (auto const name : paramNames) { - names << QString::fromStdString(name); + if (hasFunction()) { + const auto paramNames = getCurrentFunction()->getParameterNames(); + for (auto const name : paramNames) { + names << QString::fromStdString(name); + } } return names; } @@ -398,7 +400,7 @@ void FunctionModel::setGlobalParameters(const QStringList &globals) { QStringList FunctionModel::getLocalParameters() const { QStringList locals; - for (auto const name : getParameterNames()) { + for (auto const &name : getParameterNames()) { if (!m_globalParameterNames.contains(name)) locals << name; }