]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Incorrect conflict message appears
authorazv <azv@opencascade.com>
Thu, 2 Jun 2016 13:51:10 +0000 (16:51 +0300)
committerazv <azv@opencascade.com>
Thu, 2 Jun 2016 13:51:42 +0000 (16:51 +0300)
src/SketchSolver/PlaneGCSSolver/PlaneGCSSolver_Storage.cpp
src/SketchSolver/SketchSolver_Group.cpp

index 84dc0c9726a9a8c945ef173b69f6a560a2789384..4238120082f85a4d7efb4e646f40bb1b69f17070 100644 (file)
@@ -239,18 +239,20 @@ bool PlaneGCSSolver_Storage::remove(ConstraintWrapperPtr theConstraint)
 bool PlaneGCSSolver_Storage::remove(EntityWrapperPtr theEntity)
 {
   bool isFullyRemoved = SketchSolver_Storage::remove(theEntity);
-  if (theEntity->type() == ENTITY_ARC) {
-    // remove arc additional constraints
-    std::map<EntityWrapperPtr, std::vector<GCSConstraintPtr> >::iterator
-        aFound = myArcConstraintMap.find(theEntity);
-    if (aFound != myArcConstraintMap.end()) {
-      myRemovedConstraints.insert(myRemovedConstraints.end(),
-          aFound->second.begin(), aFound->second.end());
-      myArcConstraintMap.erase(aFound);
+  if (isFullyRemoved) {
+    if (theEntity->type() == ENTITY_ARC) {
+      // remove arc additional constraints
+      std::map<EntityWrapperPtr, std::vector<GCSConstraintPtr> >::iterator
+          aFound = myArcConstraintMap.find(theEntity);
+      if (aFound != myArcConstraintMap.end()) {
+        myRemovedConstraints.insert(myRemovedConstraints.end(),
+            aFound->second.begin(), aFound->second.end());
+        myArcConstraintMap.erase(aFound);
+      }
     }
+    if (theEntity->id() == myEntityLastID)
+      --myEntityLastID;
   }
-  if (isFullyRemoved && theEntity->id() == myEntityLastID)
-    --myEntityLastID;
   return isFullyRemoved;
 }
 
index 19a4a30fe4702bebce9d0e453b22d39652c91ee9..bd07463b365b6399b5f3242e8f1b48035b52a260 100644 (file)
@@ -377,10 +377,11 @@ bool SketchSolver_Group::resolveConstraints()
       updateMultiConstraints(myConstraints);
       if (myPrevResult != STATUS_OK || myPrevResult == STATUS_UNKNOWN) {
         getWorkplane()->string(SketchPlugin_Sketch::SOLVER_ERROR())->setValue("");
+        std::set<ObjectPtr> aConflicting = myConflictingConstraints;
         myConflictingConstraints.clear();
         myPrevResult = STATUS_OK;
         // the error message should be changed before sending the message
-        sendMessage(EVENT_SOLVER_REPAIRED, myConflictingConstraints);
+        sendMessage(EVENT_SOLVER_REPAIRED, aConflicting);
       }
     } else {
       mySketchSolver->undo();