Skip to content

Commit

Permalink
Make dialogs launched from script interpreter use default values.
Browse files Browse the repository at this point in the history
Refs #7744
  • Loading branch information
arturbekasov committed Aug 13, 2013
1 parent 61fa8da commit f0875eb
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions Code/Mantid/MantidQt/API/src/AlgorithmDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,18 +971,11 @@ void AlgorithmDialog::setPreviousValue(QWidget* widget, const QString& propName)
PropertyWidget * propWidget = qobject_cast<PropertyWidget*>(widget);
if (propWidget)
{
if( !isForScript() )
propWidget->setValue(value);
else
{
//Need to check if this is the default value as we don't fill them in if they are
if( m_python_arguments.contains(propName) || !property->isDefault() )
propWidget->setValue(value);
}
propWidget->setValue(value);

return;
}


// Reaching here means we have a widget type we don't understand. Tell the developer
QMessageBox::warning(this, windowTitle(),
QString("Cannot set value for ") + widget->metaObject()->className() +
Expand Down

0 comments on commit f0875eb

Please sign in to comment.