diff --git a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisDataLoader.h b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisDataLoader.h index 5c0c23eacc11..facb4860a384 100644 --- a/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisDataLoader.h +++ b/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Muon/MuonAnalysisDataLoader.h @@ -95,6 +95,8 @@ class MANTIDQT_CUSTOMINTERFACES_DLL MuonAnalysisDataLoader { /// Load dead times from file Mantid::API::Workspace_sptr loadDeadTimesFromFile(const std::string &filename) const; + // empty the cache + void clearCache(); protected: /// Set properties of algorithm from options diff --git a/MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp b/MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp index b4dd30338ab2..5001f39717e9 100644 --- a/MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp +++ b/MantidQt/CustomInterfaces/src/Muon/MuonAnalysis.cpp @@ -2694,7 +2694,7 @@ void MuonAnalysis::doSetToolbarsHidden(bool hidden) { */ void MuonAnalysis::onDeadTimeTypeChanged(int choice) { m_deadTimesChanged = true; - + m_dataLoader.clearCache(); if (choice == 0 || choice == 1) // if choice == none || choice == from file { m_uiForm.mwRunDeadTimeFile->setVisible(false); @@ -2757,6 +2757,7 @@ void MuonAnalysis::deadTimeFileSelected() { * from the form */ void MuonAnalysis::setTimeZeroState(int checkBoxState) { + m_dataLoader.clearCache(); if (checkBoxState == -1) checkBoxState = m_uiForm.timeZeroAuto->checkState(); @@ -2778,6 +2779,7 @@ void MuonAnalysis::setTimeZeroState(int checkBoxState) { * from the form */ void MuonAnalysis::setFirstGoodDataState(int checkBoxState) { + m_dataLoader.clearCache(); if (checkBoxState == -1) checkBoxState = m_uiForm.firstGoodDataAuto->checkState(); diff --git a/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisDataLoader.cpp b/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisDataLoader.cpp index c8c5914ab134..7ce7bebaa575 100644 --- a/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisDataLoader.cpp +++ b/MantidQt/CustomInterfaces/src/Muon/MuonAnalysisDataLoader.cpp @@ -472,5 +472,11 @@ void MuonAnalysisDataLoader::updateCache() const { } } +void MuonAnalysisDataLoader::clearCache() { + if (!m_loadedDataCache.empty()) { + m_loadedDataCache.clear(); + } +} + } // namespace CustomInterfaces } // namespace MantidQt diff --git a/docs/source/release/v3.9.1/index.rst b/docs/source/release/v3.9.1/index.rst index 3e3df80e6caa..bad57dbcd62a 100644 --- a/docs/source/release/v3.9.1/index.rst +++ b/docs/source/release/v3.9.1/index.rst @@ -37,7 +37,9 @@ Changes in this version * `18915 `_ Add missing parameter in function call in performance test * `18926 `_ Fix wrong detector selection when loading high angle bank user files in ISIS SANS * `18927 `_ Fix sum file behaviour for vesuvio diffraction +* `18955 `_ Fix crash in MonitorDlg * `18959 `_ Blank instrument view with U correction +* `18972 `_ Fix reading dead time data in Muon interface Summary of impact ----------------- @@ -72,9 +74,12 @@ Summary of impact +-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+ | 18927 | Allow Vesuvio to sum runs in diffraction reduction | Fix incorrect assignment in loop | **low** | +-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+ +| 18955 | Avoid possible crash in algorithm monitor dialog | Check for null pointer | **low** | ++-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+ | 18959 | Fixes blank view when U correction applied | Fix missing call after #18875 | **medium** | +-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+ - +| 18972 | Loads data with/without dead-time correction as per user request | Clear data cache after option is updated | **low** | ++-------+-----------------------------------------------------------------------------------+---------------------------------------------+--------------+ .. _download page: http://download.mantidproject.org