Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop observing ADS while the algorithms are running #38094

Open
wants to merge 1 commit into
base: release-next
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public slots:
protected:
IDataReduction *m_idrUI;
std::unique_ptr<API::IAlgorithmRunner> m_algorithmRunner;
std::unique_ptr<OutputPlotOptionsPresenter> m_plotOptionsPresenter;

private slots:
void handleNewInstrumentConfiguration();
Expand All @@ -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<OutputPlotOptionsPresenter> m_plotOptionsPresenter;
};
} // namespace CustomInterfaces
} // namespace MantidQt
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::string> outputWorkspaces{m_outputCalibrationName.toStdString()};
Expand Down Expand Up @@ -328,6 +329,7 @@ void ISISCalibration::handleRun() {
m_pythonExportWsName = m_outputResolutionName.toStdString();
}

m_plotOptionsPresenter->watchADS(false);
m_batchAlgoRunner->executeBatchAsync();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ void ISISDiagnostics::handleRun() {
}

connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(algorithmComplete(bool)));
m_plotOptionsPresenter->watchADS(false);
runAlgorithm(sliceAlg);
}

Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,10 @@ class MANTID_SPECTROSCOPY_DLL OutputPlotOptionsPresenter final : public IOutputP
void setWorkspaces(std::vector<std::string> 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);
Expand Down
Loading