- bool isDone;
- aValue = editedValue(aValue, isDone);
-
- if (isDone) {
- bool isBlocked = mySpinBox->blockSignals(true);
- mySpinBox->setValue(aValue);
- mySpinBox->blockSignals(isBlocked);
+ QString aText;
+ if (mySpinBox->hasVariable())
+ aText = mySpinBox->text();
+
+ isValueAccepted = editedValue(aValue, aText);
+ if (isValueAccepted) {
+ if (aText.isEmpty()) {
+ ModuleBase_Tools::setSpinValue(mySpinBox, aValue);
+ } else {
+ ModuleBase_Tools::setSpinText(mySpinBox, aText);
+ }
+ if (theSendSignals) {
+ emit valuesChanged();
+ // the focus leaves the control automatically by the Enter/Esc event
+ // it is processed in operation manager
+ //emit focusOutWidget(this);
+ }
+ else
+ storeValue();