]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #3222: Update highlighted error points
authorvsv <vsv@opencascade.com>
Wed, 24 Jun 2020 08:04:56 +0000 (11:04 +0300)
committervsv <vsv@opencascade.com>
Wed, 24 Jun 2020 08:04:56 +0000 (11:04 +0300)
src/PartSet/PartSet_CustomPrs.cpp

index 06299acd0ae3a7225d0c94cb5a4388cac9b92e93..a88af8d07f65fe148402d1bcd363496ae59d111f 100644 (file)
@@ -255,8 +255,10 @@ void PartSet_CustomPrs::clearErrorShape()
 {
   if (!myErrorShapes.IsNull()) {
     Handle(AIS_InteractiveContext) aContext = myWorkshop->viewer()->AISContext();
-    if (aContext->IsDisplayed(myErrorShapes))
+    if (aContext->IsDisplayed(myErrorShapes)) {
       aContext->Remove(myErrorShapes, true);
+      myErrorShapes.Nullify();
+    }
   }
 }
 
@@ -289,6 +291,7 @@ void PartSet_CustomPrs::processEvent(const std::shared_ptr<Events_Message>& theM
     else {
       if (!myErrorShapes.IsNull()) {
         aContext->Remove(myErrorShapes, true);
+        myErrorShapes.Nullify();
       }
     }
   }