diff options
Diffstat (limited to 'ui/qt/models/numeric_value_chooser_delegate.cpp')
-rw-r--r-- | ui/qt/models/numeric_value_chooser_delegate.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui/qt/models/numeric_value_chooser_delegate.cpp b/ui/qt/models/numeric_value_chooser_delegate.cpp index 06008aee88..975239ea74 100644 --- a/ui/qt/models/numeric_value_chooser_delegate.cpp +++ b/ui/qt/models/numeric_value_chooser_delegate.cpp @@ -62,11 +62,11 @@ QWidget* NumericValueChooserDelegate::createEditor(QWidget *parent, const QStyle void NumericValueChooserDelegate::setEditorData(QWidget *editor, const QModelIndex &index) const { - if ( index.isValid() ) + if (index.isValid()) { bool canConvert = false; int val = index.data().toInt(&canConvert); - if ( ! canConvert ) + if (! canConvert) val = _default; QSpinBox * spinBox = qobject_cast<QSpinBox *>(editor); @@ -78,7 +78,7 @@ void NumericValueChooserDelegate::setEditorData(QWidget *editor, const QModelInd void NumericValueChooserDelegate::setModelData(QWidget *editor, QAbstractItemModel * model, const QModelIndex &index) const { - if ( index.isValid() ) { + if (index.isValid()) { QSpinBox * spinBox = qobject_cast<QSpinBox *>(editor); model->setData(index, _default == spinBox->value() ? _defReturn : QVariant::fromValue(spinBox->value())); } else { |