Salome HOME
Merge branch 'master' of newgeom:newgeom
[modules/shaper.git] / src / Model / Model_AttributeDouble.cpp
index 23e15f0e1ad9457e92570a83dec685aa67ed0314..88b4352a56d288dd8b3b0c81a7acfdc28e5ce82f 100644 (file)
@@ -3,12 +3,19 @@
 // Author:      Mikhail PONIKAROV
 
 #include "Model_AttributeDouble.h"
+#include "Model_Events.h"
+#include <Events_Loop.h>
 
 using namespace std;
 
 void Model_AttributeDouble::setValue(const double theValue)
 {
-  myReal->Set(theValue);
+  if (myReal->Get() != theValue) {
+    myReal->Set(theValue);
+    static Events_ID anEvent = Events_Loop::eventByName(EVENT_FEATURE_UPDATED);
+    Model_FeatureUpdatedMessage aMsg(owner(), anEvent);
+    Events_Loop::loop()->send(aMsg);
+  }
 }
 
 double Model_AttributeDouble::value()