Salome HOME
Merge branch 'Dev_0.7.1' of newgeom:newgeom into Dev_0.7.1
[modules/shaper.git] / src / SketchSolver / SketchSolver_ConstraintGroup.cpp
index f311546396df5e0c87daf3ab05c3ab0fad49e324..1b1a621c251d6a46d114c6a4baf646aa5b77ade7 100644 (file)
 /// Tolerance for value of parameters
 const double tolerance = 1.e-10;
 
-/*
+/**
  * Collects all sketch solver error' codes
  * as inline static functions
- * TODO: Move this class into a separate file
  */
+ // TODO: Move this class into a separate file
 class SketchSolver_Error
 {
  public:
@@ -897,9 +897,17 @@ bool SketchSolver_ConstraintGroup::resolveConstraints()
     // We should go through the attributes map, because only attributes have valued parameters
     std::map<std::shared_ptr<ModelAPI_Attribute>, Slvs_hEntity>::iterator anEntIter =
         myEntityAttrMap.begin();
-    for (; anEntIter != myEntityAttrMap.end(); anEntIter++)
+    for (; anEntIter != myEntityAttrMap.end(); anEntIter++) {
+      if (anEntIter->first->owner().get() && anEntIter->first->owner()->data().get())
+        anEntIter->first->owner()->data()->blockSendAttributeUpdated(true);
       if (updateAttribute(anEntIter->first, anEntIter->second))
         updateRelatedConstraints(anEntIter->first);
+    }
+    // unblock all features then
+    for (; anEntIter != myEntityAttrMap.end(); anEntIter++) {
+      if (anEntIter->first->owner().get() && anEntIter->first->owner()->data().get())
+        anEntIter->first->owner()->data()->blockSendAttributeUpdated(false);
+    }
   } else if (!myConstraints.empty())
     Events_Error::send(SketchSolver_Error::CONSTRAINTS(), this);