Skip to content

Commit

Permalink
refs #4328 Default directory preference.
Browse files Browse the repository at this point in the history
  • Loading branch information
OwenArnold committed Jan 16, 2012
1 parent 2810084 commit 15003c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Code/Mantid/MantidQt/CustomInterfaces/src/CreateMDWorkspace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,12 +542,7 @@ void CreateMDWorkspace::createMDWorkspaceClicked()
QString otherDimensions = algDlg.getOtherDimensions();
QString preProcessedDetectors = algDlg.getPreprocessedDetectors();
QString location = algDlg.getLocation();
if(location.isEmpty())
{
runConfirmation("Output location is mandatory. Please start again and enter one.");
return;
}


//2) Run ConvertToMDEvents on each workspace.
QString fileNames;
for(WorkspaceMementoCollection::size_type i = 0; i < m_data.size(); i++)
Expand Down Expand Up @@ -591,6 +586,7 @@ void CreateMDWorkspace::createMDWorkspaceClicked()
fileNames += ",";
}
fileNames += location + "/" + id + "_md.nxs";

currentMemento->cleanUp();
}

Expand All @@ -611,7 +607,9 @@ void CreateMDWorkspace::createMDWorkspaceClicked()
runConfirmation("Aborted during merge. See log messages.");
}
}

//Report successful conversion.
std::string msg = "Success. Ouput MD files have been written to : " + algDlg.getLocation();
runConfirmation(msg);
}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "MantidQtCustomInterfaces/CreateMDWorkspaceAlgDialog.h"
#include "MantidKernel/ConfigService.h"
#include <QComboBox>
#include <QLineEdit>
#include <QCheckBox>
Expand All @@ -18,6 +19,8 @@ CreateMDWorkspaceAlgDialog::CreateMDWorkspaceAlgDialog()
m_uiForm.combo_analysis_mode->addItem("Direct");
m_uiForm.combo_analysis_mode->addItem("Elastic");
m_uiForm.combo_analysis_mode->addItem("Indirect");

m_location = QString(Mantid::Kernel::ConfigService::Instance().getTempDir().c_str());

this->setWindowTitle("Set MDWorkspace Creation Parameters");
}
Expand Down

0 comments on commit 15003c8

Please sign in to comment.