Salome HOME
Merge branch 'Dev_2.1.0' of salome:modules/shaper into Dev_2.1.0
[modules/shaper.git] / src / PartSet / PartSet_OperationPrs.cpp
index 1466994594869ee530523855c2cb73c5ebb9dbd7..9f52a502d035ba62e4f290737138cb6ee668b189 100755 (executable)
@@ -25,8 +25,6 @@
 #include <ModelAPI_Session.h>
 #include <ModelAPI_ResultCompSolid.h>
 
-#include <GeomValidators_Tools.h>
-
 #include <GeomAPI_IPresentable.h>
 
 #include <StdPrs_WFDeflectionShape.hxx>
@@ -76,10 +74,17 @@ void PartSet_OperationPrs::updateShapes()
     myFeatureResults = myFeature->results();
 }
 
+bool PartSet_OperationPrs::hasShapes()
+{
+  return !myFeatureShapes.empty() || !myFeatureResults.empty();
+}
+
 void PartSet_OperationPrs::Compute(const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
                                    const Handle(Prs3d_Presentation)& thePresentation, 
                                    const Standard_Integer theMode)
 {
+  if (!hasShapes())
+    return;
   // when the feature can not be visualized in the module, the operation preview should not
   // be visualized also
   if (!myWorkshop->module()->canDisplayObject(myFeature))