+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
// File: ModuleBase_WidgetEditor.cpp
// Created: 25 Apr 2014
// Author: Natalia ERMOLAEVA
#include <ModuleBase_WidgetEditor.h>
-#include <ModuleBase_DoubleSpinBox.h>
+#include <ModuleBase_ParamSpinBox.h>
#include <ModuleBase_Tools.h>
#include <Config_Keywords.h>
ModuleBase_Tools::zeroMargins(aLay);
QLineEdit* aEditor = new QLineEdit(QString::number(theValue), &aDlg);
+ aEditor->selectAll();
aEditor->setValidator(new QDoubleValidator(aEditor));
QObject::connect(aEditor, SIGNAL(returnPressed()), &aDlg, SLOT(accept()));
aLay->addWidget(aEditor);
aValue = editedValue(aValue, isDone);
if (isDone) {
- bool isBlocked = mySpinBox->blockSignals(true);
- mySpinBox->setValue(aValue);
- mySpinBox->blockSignals(isBlocked);
+ ModuleBase_Tools::setSpinValue(mySpinBox, aValue);
}
emit valuesChanged();
emit focusOutWidget(this);