diff --git a/qt/scientific_interfaces/Indirect/Reduction/DataReductionTab.h b/qt/scientific_interfaces/Indirect/Reduction/DataReductionTab.h index d8af476204e0..d2844dd79e08 100644 --- a/qt/scientific_interfaces/Indirect/Reduction/DataReductionTab.h +++ b/qt/scientific_interfaces/Indirect/Reduction/DataReductionTab.h @@ -86,6 +86,7 @@ public slots: protected: IDataReduction *m_idrUI; std::unique_ptr m_algorithmRunner; + std::unique_ptr m_plotOptionsPresenter; private slots: void handleNewInstrumentConfiguration(); @@ -94,8 +95,6 @@ private slots: virtual void setFileExtensionsByName(bool filter) { UNUSED_ARG(filter); }; virtual void setLoadHistory(bool doLoadHistory) { (void)doLoadHistory; } virtual void updateInstrumentConfiguration() = 0; - - std::unique_ptr m_plotOptionsPresenter; }; } // namespace CustomInterfaces } // namespace MantidQt diff --git a/qt/scientific_interfaces/Indirect/Reduction/ISISCalibration.cpp b/qt/scientific_interfaces/Indirect/Reduction/ISISCalibration.cpp index e96bc0cf5b59..b4a0f7b84acd 100644 --- a/qt/scientific_interfaces/Indirect/Reduction/ISISCalibration.cpp +++ b/qt/scientific_interfaces/Indirect/Reduction/ISISCalibration.cpp @@ -287,6 +287,7 @@ void ISISCalibration::setResolutionSpectraRange(const double &minimum, const dou * @param error If the algorithms failed. */ void ISISCalibration::algorithmComplete(bool error) { + m_plotOptionsPresenter->watchADS(true); m_runPresenter->setRunEnabled(true); if (!error) { std::vector outputWorkspaces{m_outputCalibrationName.toStdString()}; @@ -328,6 +329,7 @@ void ISISCalibration::handleRun() { m_pythonExportWsName = m_outputResolutionName.toStdString(); } + m_plotOptionsPresenter->watchADS(false); m_batchAlgoRunner->executeBatchAsync(); } diff --git a/qt/scientific_interfaces/Indirect/Reduction/ISISDiagnostics.cpp b/qt/scientific_interfaces/Indirect/Reduction/ISISDiagnostics.cpp index 1ae124edd981..6d1694e409c2 100644 --- a/qt/scientific_interfaces/Indirect/Reduction/ISISDiagnostics.cpp +++ b/qt/scientific_interfaces/Indirect/Reduction/ISISDiagnostics.cpp @@ -166,6 +166,7 @@ void ISISDiagnostics::handleRun() { } connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(algorithmComplete(bool))); + m_plotOptionsPresenter->watchADS(false); runAlgorithm(sliceAlg); } @@ -202,6 +203,7 @@ void ISISDiagnostics::handleValidation(IUserInputValidator *validator) const { * @param error If the algorithm failed */ void ISISDiagnostics::algorithmComplete(bool error) { + m_plotOptionsPresenter->watchADS(true); disconnect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(algorithmComplete(bool))); m_runPresenter->setRunEnabled(true); m_uiForm.pbSave->setEnabled(!error); diff --git a/qt/widgets/spectroscopy/inc/MantidQtWidgets/Spectroscopy/OutputWidget/OutputPlotOptionsPresenter.h b/qt/widgets/spectroscopy/inc/MantidQtWidgets/Spectroscopy/OutputWidget/OutputPlotOptionsPresenter.h index 525491ff6d62..c36f8ddd0085 100644 --- a/qt/widgets/spectroscopy/inc/MantidQtWidgets/Spectroscopy/OutputWidget/OutputPlotOptionsPresenter.h +++ b/qt/widgets/spectroscopy/inc/MantidQtWidgets/Spectroscopy/OutputWidget/OutputPlotOptionsPresenter.h @@ -56,9 +56,10 @@ class MANTID_SPECTROSCOPY_DLL OutputPlotOptionsPresenter final : public IOutputP void setWorkspaces(std::vector const &workspaces); void clearWorkspaces(); + void watchADS(bool on); + private: void setupPresenter(PlotWidget const &plotType, std::string const &fixedIndices); - void watchADS(bool on); void setPlotting(bool plotting); void setOptionsEnabled(bool enable);