Skip to content

Commit

Permalink
Return the old logic.
Browse files Browse the repository at this point in the history
Refs #7720
(cherry picked from commit 9b2e6e8)
  • Loading branch information
arturbekasov authored and stuartcampbell committed Aug 13, 2013
1 parent b8c305b commit 998ed6f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Code/Mantid/MantidQt/API/src/AlgorithmDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ QString AlgorithmDialog::getPreviousValue(const QString& propName)
if (value.isEmpty())
value = AlgorithmInputHistory::Instance().previousInput(m_algName, propName);
}
else if(getAlgorithmProperty(propName) != NULL)
else if(getAlgorithmProperty(propName))
{
value = m_propertyValueMap.value(propName);
}
Expand All @@ -905,11 +905,12 @@ QString AlgorithmDialog::getPreviousValue(const QString& propName)
*/
void AlgorithmDialog::setPreviousValue(QWidget* widget, const QString& propName)
{
QString value = getPreviousValue(propName);

if(value.isEmpty())
// If is called from a script, check if we have such property
if(isForScript() && !getAlgorithmProperty(propName))
return;

QString value = getPreviousValue(propName);

Mantid::Kernel::Property *property = getAlgorithmProperty(propName);

// Do the right thing for the widget type
Expand Down

0 comments on commit 998ed6f

Please sign in to comment.