Skip to content

Commit

Permalink
Re-add diagnostics tab
Browse files Browse the repository at this point in the history
Refs #10266
  • Loading branch information
DanNixon committed Nov 4, 2014
1 parent a5a92d1 commit 3cb0d71
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
Expand Up @@ -127,7 +127,7 @@ void IndirectDataReduction::initLayout()
// Create the tabs
/* m_tabs["Energy Transfer"] = new IndirectConvertToEnergy(m_uiForm, this); */
/* m_tabs["Calibration"] = new IndirectCalibration(m_uiForm, this); */
/* m_tabs["Diagnostics"] = new IndirectDiagnostics(m_uiForm, this); */
m_tabs["Diagnostics"] = new IndirectDiagnostics(m_uiForm, this);
m_tabs["Transmission"] = new IndirectTransmission(m_uiForm, this);
m_tabs["Symmetrise"] = new IndirectSymmetrise(m_uiForm, this);
m_tabs["S(Q, w)"] = new IndirectSqw(m_uiForm, this);
Expand Down
Expand Up @@ -139,7 +139,7 @@ namespace CustomInterfaces
std::string idfDirectory = Mantid::Kernel::ConfigService::Instance().getString("instrumentDefinition.directory");

// If the workspace does not exist in ADS then load an ampty instrument
if(AnalysisDataService::Instance().doesExist(instWorkspaceName))
if(!AnalysisDataService::Instance().doesExist(instWorkspaceName))
{
std::string parameterFilename = idfDirectory + instrumentName + "_Definition.xml";
IAlgorithm_sptr loadAlg = AlgorithmManager::Instance().create("LoadEmptyInstrument");
Expand Down
Expand Up @@ -252,7 +252,10 @@ namespace CustomInterfaces
QFileInfo fi(filename);
QString wsname = fi.baseName();

if(!loadFile(filename, wsname, m_uiForm.leSpectraMin->text().toInt(), m_uiForm.leSpectraMax->text().toInt()))
int specMin = static_cast<int>(m_dblManager->value(m_properties["SpecMin"]));
int specMax = static_cast<int>(m_dblManager->value(m_properties["SpecMax"]));

if(!loadFile(filename, wsname, specMin, specMax))
{
emit showMessageBox("Unable to load file.\nCheck whether your file exists and matches the selected instrument in the EnergyTransfer tab.");
return;
Expand Down

0 comments on commit 3cb0d71

Please sign in to comment.