+ // In order to synchronize value and text
+ // If it is not synchronized sometimes it could take vale not as a digit but as a string
+ aReal->setText(mySpinBox->text().toStdString());
+ } else {
+ // Here is a text of a real value or an expression.
+ std::string aText = mySpinBox->text().toStdString();
+ aReal->setText(aText);
+ // 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);