diff --git a/Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MolDyn.py b/Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MolDyn.py
index 8e0165eaef88..ebce03896e89 100644
--- a/Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MolDyn.py
+++ b/Code/Mantid/Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/MolDyn.py
@@ -75,7 +75,7 @@ def PyInit(self):
doc='Resolution workspace')
self.declareProperty(name='MaxEnergy', defaultValue='',
- doc='Crop the result spectra at a given energy')
+ doc='Crop the result spectra at a given energy (leave blank for no crop)')
self.declareProperty(name='Plot', defaultValue='None',
validator=StringListValidator(['None', 'Spectra', 'Contour', 'Both']),
@@ -97,7 +97,7 @@ def validateInputs(self):
sample_filename = self.getPropertyValue('Filename')
function_list = self.getProperty('Functions').value
res_ws = self.getPropertyValue('Resolution')
- emax = self.getPropertyValue('MaxEnergy')
+ emax = self.getProperty('MaxEnergy')
if len(function_list) == 0 and os.path.splitext(sample_filename)[1] == 'cdl':
issues['Functions'] = 'Must specify at least one function when loading a CDL file'
diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectMolDyn.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectMolDyn.ui
index 78d9746e8396..6326d471608d 100644
--- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectMolDyn.ui
+++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/IndirectMolDyn.ui
@@ -104,19 +104,21 @@
-
-
+
+
+
+ 150
+ 0
+
+
- <html><head/><body><p>Crop the upper energy range of any workspaces with energy as the X unit (e.g. Sqw).</p></body></html>
+ <html><head/><body><p>Crop the upper energy range of any workspaces with energy as the X unit (e.g. S(Q,w)).</p></body></html>
-
- 0
+
+ meV
-
-
- -
-
-
- meV
+
+ 1000.000000000000000
@@ -308,7 +310,7 @@
mwRun
leFunctionNames
ckCropEnergy
- leMaxEnergy
+ dspMaxEnergy
ckResolution
dsResolution
ckVerbose
diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/IndirectMolDyn.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/IndirectMolDyn.cpp
index e82682d73410..003ddec59ed0 100644
--- a/Code/Mantid/MantidQt/CustomInterfaces/src/IndirectMolDyn.cpp
+++ b/Code/Mantid/MantidQt/CustomInterfaces/src/IndirectMolDyn.cpp
@@ -17,7 +17,7 @@ namespace MantidQt
m_uiForm.setupUi(parent);
connect(m_uiForm.ckResolution, SIGNAL(toggled(bool)), m_uiForm.dsResolution, SLOT(setEnabled(bool)));
- connect(m_uiForm.ckCropEnergy, SIGNAL(toggled(bool)), m_uiForm.leMaxEnergy, SLOT(setEnabled(bool)));
+ connect(m_uiForm.ckCropEnergy, SIGNAL(toggled(bool)), m_uiForm.dspMaxEnergy, SLOT(setEnabled(bool)));
}
/**
@@ -50,14 +50,6 @@ namespace MantidQt
return false;
}
- bool energyIsNumber = false;
- m_uiForm.leMaxEnergy->text().toDouble(&energyIsNumber);
- if(m_uiForm.ckCropEnergy->isChecked() && !energyIsNumber)
- {
- emit showMessageBox("Max energy must be a number.");
- return false;
- }
-
return true;
}
@@ -82,7 +74,7 @@ namespace MantidQt
// Set energy crop option
if(m_uiForm.ckCropEnergy->isChecked())
- molDynAlg->setProperty("MaxEnergy", m_uiForm.leMaxEnergy->text().toStdString());
+ molDynAlg->setProperty("MaxEnergy", QString::number(m_uiForm.dspMaxEnergy->value()).toStdString());
// Set instrument resolution option
if(m_uiForm.ckResolution->isChecked())