Salome HOME
A new event Visual Attributes Changed is defined for performance sake.
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_Projection.cpp
index 79eb675ca240ca273480dd8d6d4c92ed3b8f08d9..e04031fee6db7cee731dd447ce225900018759b9 100644 (file)
@@ -35,6 +35,9 @@
 #include <ModelAPI_Session.h>
 #include <ModelAPI_Validator.h>
 #include <ModelAPI_Tools.h>
+#include <ModelAPI_Events.h>
+
+#include <Events_Loop.h>
 
 #include <GeomAPI_Circ.h>
 #include <GeomAPI_Edge.h>
@@ -51,6 +54,7 @@
 
 static const double tolerance = 1.e-7;
 
+
 SketchPlugin_Projection::SketchPlugin_Projection()
     : SketchPlugin_SketchEntity(),
       myIsComputing(false)
@@ -371,6 +375,9 @@ void SketchPlugin_Projection::computeProjection(const std::string& theID)
       setResult(aResult);
       GeomShapePtr anEmptyVal;
       aProjection->selection(EXTERNAL_ID())->setValue(lastResult(), anEmptyVal);
+
+      static const Events_ID anEvent = Events_Loop::eventByName(EVENT_VISUAL_ATTRIBUTES);
+      ModelAPI_EventCreator::get()->sendUpdated(aProjection, anEvent, false);
     }
   }
 }