From: nds Date: Wed, 2 Mar 2016 05:14:52 +0000 (+0300) Subject: Rectangle correction: by coicidence creation, flush Created X-Git-Tag: V_2.2.0~27 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7e5a8285a0b3ed13d222c42859d61a73d9a9e24a;p=modules%2Fshaper.git Rectangle correction: by coicidence creation, flush Created --- diff --git a/src/PartSet/PartSet_Tools.cpp b/src/PartSet/PartSet_Tools.cpp index 8ee41ea47..1b2ed450a 100755 --- a/src/PartSet/PartSet_Tools.cpp +++ b/src/PartSet/PartSet_Tools.cpp @@ -14,6 +14,9 @@ #include #include #include +#include + +#include #include @@ -255,8 +258,8 @@ void PartSet_Tools::createConstraint(CompositeFeaturePtr theSketch, 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 PartSet_Tools:: diff --git a/src/PartSet/PartSet_WidgetPoint2d.cpp b/src/PartSet/PartSet_WidgetPoint2d.cpp index 813741c88..14294830c 100644 --- a/src/PartSet/PartSet_WidgetPoint2d.cpp +++ b/src/PartSet/PartSet_WidgetPoint2d.cpp @@ -418,6 +418,7 @@ void PartSet_WidgetPoint2D::setConstraintWith(const ObjectPtr& 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)); }