]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SketchSolver/SketchSolver_Group.cpp
Salome HOME
Do not allow user to move fixed entities (issue #1043)
[modules/shaper.git] / src / SketchSolver / SketchSolver_Group.cpp
index 5a9652fe6955ae404f23f248f5d8da9605bf81c3..9ad17d7508f15014737c74e2dbe5357fffea7b1e 100644 (file)
@@ -563,7 +563,8 @@ bool SketchSolver_Group::resolveConstraints()
     updateConstraints();
 
   bool aResolved = false;
-  if (myStorage->isNeedToResolve() && !isEmpty()) {
+  bool isGroupEmpty = isEmpty();
+  if (myStorage->isNeedToResolve() && !isGroupEmpty) {
     myConstrSolver.setGroupID(myID);
     myConstrSolver.calculateFailedConstraints(false);
     myStorage->initializeSolver(myConstrSolver);
@@ -631,6 +632,16 @@ bool SketchSolver_Group::resolveConstraints()
     }
 
     aResolved = true;
+  } else if (!isGroupEmpty) {
+    myFeatureStorage->blockEvents(true);
+    // Check there are constraints Fixed. If they exist, update parameters by stored values
+    ConstraintConstraintMap::iterator aCIt = myConstraints.begin();
+    for (; aCIt != myConstraints.end(); ++aCIt)
+      if (aCIt->first->getKind() == SketchPlugin_ConstraintRigid::ID()) {
+        aCIt->second->refresh();
+        aResolved = true;
+      }
+     myFeatureStorage->blockEvents(false);
   }
   removeTemporaryConstraints();
   myStorage->setNeedToResolve(false);