- DataPtr aData = theFeature->data();
- AttributeDoublePtr aRef = aData->real(theAttribute);
- double aValue = aRef->value();
-
- bool isDone;
- aValue = editedValue(aValue, isDone);
- if (isDone)
- aRef->setValue(aValue);
+ // we need to emit the focus in event manually in order to save the widget as an active
+ // in the property panel before the mouse leave event happens in the viewer. The module
+ // ask an active widget and change the feature visualization if the widget is not the current one.
+ emit focusInWidget(this);
+
+ // nds: it seems, that the envents processing is not necessary anymore
+ // White while all events will be processed
+ //QApplication::processEvents();
+ double aValue = mySpinBox->value();
+ QString aText;
+ if (mySpinBox->hasVariable())
+ aText = mySpinBox->text();
+
+ editedValue(aValue, aText);
+ if (aText.isEmpty()) {
+ ModuleBase_Tools::setSpinValue(mySpinBox, aValue);
+ } else {
+ ModuleBase_Tools::setSpinText(mySpinBox, aText);
+ }
+ emit valuesChanged();
+ emit focusOutWidget(this);