Salome HOME
Make the expressions in double attributes and points updated after the parameter...
[modules/shaper.git] / src / Model / Model_AttributeDouble.cpp
index 3ef3e3c41c1510d217a9efdb6aed4621f4bc4b61..0736eddc0570d7a4611121da979160655e65819f 100644 (file)
@@ -47,12 +47,9 @@ void Model_AttributeDouble::setText(const std::string& theValue)
   if (myText->Get() != aValue) {
     myText->Set(aValue);
     owner()->data()->sendAttributeUpdated(this);
+
     // 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(owner()->data()->attribute(id())); // to get shared pointer to this
-    Events_Loop::loop()->send(aMessage);
+    ModelAPI_AttributeEvalMessage::send(owner()->data()->attribute(id()), this);
   }
 }