Skip to content

Commit

Permalink
Merge branch 'feature/7860_indirect_symmetrise' into develop
Browse files Browse the repository at this point in the history
Conflicts:
	Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectDataReductionTab.h
	Code/Mantid/MantidQt/CustomInterfaces/src/IndirectDataReductionTab.cpp

Refs #7860
  • Loading branch information
DanNixon committed Sep 4, 2014
2 parents eaa7b36 + 58fffdb commit 2e37465
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Expand Up @@ -136,8 +136,8 @@ namespace CustomInterfaces

/// Double editor facotry for the properties browser
DoubleEditorFactory* m_dblEdFac;
/// Algorithm runner object to execute chains algorithms on a seperate thread from the GUI
MantidQt::API::BatchAlgorithmRunner *m_batchAlgoRunner;
/// Algorithm runner object to execute algorithms on a seperate thread from the GUI
MantidQt::API::AlgorithmRunner m_algRunner;

/// Use a Python runner for when we need the output of a script
MantidQt::API::PythonRunner m_pythonRunner;
Expand Down
Expand Up @@ -19,19 +19,19 @@ namespace CustomInterfaces
m_properties(),
m_dblManager(new QtDoublePropertyManager()), m_blnManager(new QtBoolPropertyManager()), m_grpManager(new QtGroupPropertyManager()),
m_dblEdFac(new DoubleEditorFactory()),
m_algRunner(NULL),
m_uiForm(uiForm)
{
m_parentWidget = dynamic_cast<QWidget *>(parent);

m_batchAlgoRunner = new MantidQt::API::BatchAlgorithmRunner(m_parentWidget);
m_valInt = new QIntValidator(m_parentWidget);
m_valDbl = new QDoubleValidator(m_parentWidget);
m_valPosDbl = new QDoubleValidator(m_parentWidget);

const double tolerance = 0.00001;
m_valPosDbl->setBottom(tolerance);

QObject::connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(algorithmFinished(bool)));
connect(&m_algRunner, SIGNAL(algorithmComplete(bool)), this, SLOT(algorithmFinished(bool)));
connect(&m_pythonRunner, SIGNAL(runAsPythonScript(const QString&, bool)), this, SIGNAL(runAsPythonScript(const QString&, bool)));
}

Expand Down Expand Up @@ -303,8 +303,7 @@ namespace CustomInterfaces
void IndirectDataReductionTab::runAlgorithm(const Mantid::API::IAlgorithm_sptr algorithm)
{
algorithm->setRethrows(true);
m_batchAlgoRunner->addAlgorithm(algorithm);
m_batchAlgoRunner->executeBatchAsync();
m_algRunner.startAlgorithm(algorithm);
}

/**
Expand Down
Expand Up @@ -278,7 +278,7 @@ namespace CustomInterfaces
void IndirectSymmetrise::preview()
{
// Handle algorithm completion signal
connect(m_algRunner, SIGNAL(algorithmComplete(bool)), this, SLOT(previewAlgDone(bool)));
connect(&m_algRunner, SIGNAL(algorithmComplete(bool)), this, SLOT(previewAlgDone(bool)));

// Do nothing if no data has been laoded
QString workspaceName = m_uiForm.symm_dsInput->getCurrentDataName();
Expand Down Expand Up @@ -343,7 +343,7 @@ namespace CustomInterfaces
plotMiniPlot("__Symmetrise_temp", spectrumIndex, "SymmPreviewPlot");

// Don't want this to trigger when the algorithm is run for all spectra
disconnect(m_algRunner, SIGNAL(algorithmComplete(bool)), this, SLOT(previewAlgDone(bool)));
disconnect(&m_algRunner, SIGNAL(algorithmComplete(bool)), this, SLOT(previewAlgDone(bool)));
}

} // namespace CustomInterfaces
Expand Down

0 comments on commit 2e37465

Please sign in to comment.