+ QString aText;
+ if (mySpinBox->hasVariable())
+ aText = mySpinBox->text();
+
+ isValueAccepted = editedValue(mySpinBox->minimum(), mySpinBox->maximum(), aValue, aText);
+ if (isValueAccepted) {
+ if (aText.isEmpty()) {
+ if (mySpinBox->hasVariable()) {
+ // variable text should be cleared before setting value as the value
+ // will not be set if there is a varable in control
+ ModuleBase_Tools::setSpinText(mySpinBox, "");
+ }
+ 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();
+ }
+ ModuleBase_Tools::setFocus(mySpinBox, "ModuleBase_WidgetEditor::editedValue");
+ mySpinBox->selectAll();
+ // enter is processed, so we need not anymore emit clicked signal
+ //if (theSendSignals && !myIsEditing && isValueAccepted)
+ // emit enterClicked(this);
+
+ return isValueAccepted;
+}