Salome HOME
Improvement of "Updater" algorithms
[modules/shaper.git] / src / Model / Model_ResultConstruction.cpp
index 443c9ce9f24316fbef0b2f1d9c924866f5061d82..a882b99d6a9ad5dc41bd8b318e2432d301c4e1de 100644 (file)
@@ -10,6 +10,8 @@
 #include <Config_PropManager.h>
 #include <GeomAPI_PlanarEdges.h>
 #include <GeomAlgoAPI_SketchBuilder.h>
+#include <Events_Loop.h>
+#include <ModelAPI_Events.h>
 
 void Model_ResultConstruction::initAttributes()
 {
@@ -29,6 +31,8 @@ void Model_ResultConstruction::colorConfigInfo(std::string& theSection, std::str
 void Model_ResultConstruction::setShape(std::shared_ptr<GeomAPI_Shape> theShape)
 {
   if (myShape != theShape && (!theShape.get() || !theShape->isEqual(myShape))) {
+    static const Events_ID anEvent = Events_Loop::eventByName(EVENT_OBJECT_UPDATED);
+    ModelAPI_EventCreator::get()->sendUpdated(data()->owner(), anEvent);
     myShape = theShape;
     if (theShape.get()) {
       myFacesUpToDate = false;
@@ -72,7 +76,7 @@ int Model_ResultConstruction::facesNum()
     }
     myFacesUpToDate = true;
   }
-  return myFaces.size();
+  return int(myFaces.size());
 }
 
 std::shared_ptr<GeomAPI_Face> Model_ResultConstruction::face(const int theIndex)