- // Send it to evaluator to convert into the double and store in the attribute
- static Events_ID anId = ModelAPI_AttributeEvalMessage::eventId();
- std::shared_ptr<ModelAPI_AttributeEvalMessage> aMessage =
- std::shared_ptr<ModelAPI_AttributeEvalMessage>(new ModelAPI_AttributeEvalMessage(anId, this));
- aMessage->setAttribute(aData->attribute(attributeID()));
- Events_Loop::loop()->send(aMessage);
+ } else {
+ // it is important to set the empty text value to the attribute before set the value
+ // because setValue tries to calculate the attribute value according to the
+ // attribute current text
+ aReal->setText("");
+ aReal->setValue(mySpinBox->value());