]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/PartSet/PartSet_CustomPrs.cpp
Salome HOME
updated copyright message
[modules/shaper.git] / src / PartSet / PartSet_CustomPrs.cpp
index 7b98ee6198ba9b9852ce09a5fdf49b97198d719b..c38e89494867b6eaa6ba468fe6ea55c0558e24b0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -171,6 +171,9 @@ bool PartSet_CustomPrs::displayPresentation(
       isModified = true;
     }
     else {
+      if (myFeature->firstResult().get()) {
+        PartSet_Module::setTexture(aPresentation, myFeature->firstResult());
+      }
       anOperationPrs->Redisplay();
       isModified = true;
       aRedisplayed = true;
@@ -255,8 +258,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 +294,7 @@ void PartSet_CustomPrs::processEvent(const std::shared_ptr<Events_Message>& theM
     else {
       if (!myErrorShapes.IsNull()) {
         aContext->Remove(myErrorShapes, true);
+        myErrorShapes.Nullify();
       }
     }
   }