From 55e3fad6301c54d84a126582cb34260cb19b7f65 Mon Sep 17 00:00:00 2001 From: Dan Nixon Date: Mon, 3 Nov 2014 11:39:40 +0000 Subject: [PATCH] Corrected merge errors and compiler warnings Refs #10277 --- .../IndirectDataReductionTab.h | 4 +++- .../inc/MantidQtCustomInterfaces/IndirectTab.h | 2 +- .../src/IndirectDataReductionTab.cpp | 15 +++++++++++++++ .../MantidQt/CustomInterfaces/src/Quasi.cpp | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataReductionTab.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataReductionTab.h index b7aaae18964e..d6c2812eac1d 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataReductionTab.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataReductionTab.h @@ -89,13 +89,15 @@ namespace CustomInterfaces std::map getRangesFromInstrument(QString instName = "", QString analyser = "", QString reflection = ""); - protected: Ui::IndirectDataReduction m_uiForm; signals: /// Update the Run button on the IDR main window void updateRunButton(bool enabled = true, QString message = "Run", QString tooltip = ""); + private: + bool m_tabRunning; + private slots: void tabExecutionComplete(bool error); diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectTab.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectTab.h index a6481550d644..68ba60cde341 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectTab.h +++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectTab.h @@ -152,7 +152,7 @@ namespace CustomInterfaces /// Run a python script void runAsPythonScript(const QString & code, bool no_output); - private: + protected: /// Overidden by child class. virtual void setup() = 0; /// Overidden by child class. diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp index fbf1f38415b0..827ef8cea00a 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp @@ -45,6 +45,21 @@ namespace CustomInterfaces } } + /** + * Slot used to update the run button when an algorithm that was strted by the Run button complete. + * + * @param error Unused + */ + void IndirectDataReductionTab::tabExecutionComplete(bool error) + { + UNUSED_ARG(error); + if(m_tabRunning) + { + m_tabRunning = false; + emit updateRunButton(); + } + } + /** * Loads an empty instrument into a workspace (__empty_INST) unless the workspace already exists. * diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Quasi.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Quasi.cpp index 3d0efe63cc0b..f374a559681a 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/Quasi.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Quasi.cpp @@ -192,7 +192,7 @@ namespace MantidQt MatrixWorkspace_sptr outputWorkspace = AnalysisDataService::Instance().retrieveWS(outWsName.toStdString()); TextAxis* axis = dynamic_cast(outputWorkspace->getAxis(1)); - for(int histIndex = 0; histIndex < outputWorkspace->getNumberHistograms(); histIndex++) + for(size_t histIndex = 0; histIndex < outputWorkspace->getNumberHistograms(); histIndex++) { QString specName = QString::fromStdString(axis->label(histIndex));