]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Optimize performance while editing sketch (case for issue #1692)
authorazv <azv@opencascade.com>
Tue, 30 Aug 2016 08:10:15 +0000 (11:10 +0300)
committerazv <azv@opencascade.com>
Tue, 30 Aug 2016 08:10:38 +0000 (11:10 +0300)
Update only groups of entities which should be recalculated or consist of Fixed constraints only.

src/SketchSolver/SketchSolver_Group.cpp

index 2dbb20336ad790d222b820619c1ed0e4c9ebfabc..e8dfdc97521fbe28eb473ac39ee21a1353043785 100644 (file)
@@ -430,14 +430,15 @@ bool SketchSolver_Group::resolveConstraints()
 
     aResolved = true;
   } else if (!isGroupEmpty) {
-    // Check there are constraints Fixed. If they exist, update parameters by stored values
+    // Check if the group contains only constraints Fixed, update parameters by stored values
+    aResolved = true;
     ConstraintConstraintMap::iterator aCIt = myConstraints.begin();
     for (; aCIt != myConstraints.end(); ++aCIt)
-      if (aCIt->first->getKind() == SketchPlugin_ConstraintRigid::ID()) {
-        aResolved = true;
+      if (aCIt->first->getKind() != SketchPlugin_ConstraintRigid::ID()) {
+        aResolved = false;
         break;
       }
-    if (aCIt != myConstraints.end())
+    if (aCIt == myConstraints.end())
       myStorage->refresh();
   }
   removeTemporaryConstraints();