]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Rectangle correction: by coicidence creation, flush Created
authornds <nds@opencascade.com>
Wed, 2 Mar 2016 05:14:52 +0000 (08:14 +0300)
committernds <nds@opencascade.com>
Wed, 2 Mar 2016 05:14:52 +0000 (08:14 +0300)
src/PartSet/PartSet_Tools.cpp
src/PartSet/PartSet_WidgetPoint2d.cpp

index 8ee41ea47b8fc070c7f6f46c4b04d8a5dace060e..1b2ed450a257721d1c81a00949224764e7c092fe 100755 (executable)
@@ -14,6 +14,9 @@
 #include <ModelAPI_Document.h>
 #include <ModelAPI_Session.h>
 #include <ModelAPI_ResultConstruction.h>
 #include <ModelAPI_Document.h>
 #include <ModelAPI_Session.h>
 #include <ModelAPI_ResultConstruction.h>
+#include <ModelAPI_Events.h>
+
+#include <Events_Loop.h>
 
 #include <SketcherPrs_Tools.h>
 
 
 #include <SketcherPrs_Tools.h>
 
@@ -255,8 +258,8 @@ void PartSet_Tools::createConstraint(CompositeFeaturePtr theSketch,
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_B()));
   aRef2->setAttr(thePoint2);
 
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_B()));
   aRef2->setAttr(thePoint2);
 
-  if (aFeature)  // TODO: generate an error if feature was not created
-    aFeature->execute();
+  // we need to flush created signal in order to coincidence is processed by solver
+  Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
 }
 
 /*std::shared_ptr<GeomDataAPI_Point2D> PartSet_Tools::
 }
 
 /*std::shared_ptr<GeomDataAPI_Point2D> PartSet_Tools::
index 813741c88172a86b3a5f9ead67acb576d3b80bfc..14294830cee2f669f2870ae1f59d7fbb3fb39d2c 100644 (file)
@@ -418,6 +418,7 @@ void PartSet_WidgetPoint2D::setConstraintWith(const ObjectPtr& theObject)
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_B()));
   aRef2->setObject(theObject);
 
       ModelAPI_AttributeRefAttr>(aData->attribute(SketchPlugin_Constraint::ENTITY_B()));
   aRef2->setObject(theObject);
 
+  // we need to flush created signal in order to coincidence is processed by solver
   Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
 }
 
   Events_Loop::loop()->flush(Events_Loop::eventByName(EVENT_OBJECT_CREATED));
 }