]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix for the issue #1100
authormpv <mpv@opencascade.com>
Fri, 20 Nov 2015 06:35:05 +0000 (09:35 +0300)
committermpv <mpv@opencascade.com>
Fri, 20 Nov 2015 06:35:05 +0000 (09:35 +0300)
src/Model/Model_Data.cpp

index 75b38aeb01e0f85057c88e9bc7dfeef34acb9202..68656b9d5b3db077d88228040aa5ffec75b273aa 100644 (file)
@@ -24,6 +24,7 @@
 #include <ModelAPI_Validator.h>
 #include <ModelAPI_Session.h>
 #include <ModelAPI_ResultPart.h>
+#include <ModelAPI_ResultCompsolid.h>
 #include <ModelAPI_Tools.h>
 #include <Model_Validator.h>
 
@@ -430,7 +431,10 @@ void Model_Data::updateConcealmentFlag()
   std::shared_ptr<ModelAPI_Result> aRes = 
     std::dynamic_pointer_cast<ModelAPI_Result>(myObject);
   if (aRes.get()) {
-    aRes->setIsConcealed(false);
+    // if compsolid result has subs, do nothing directly: it depends on the sub's status (#1100)
+    ResultCompSolidPtr aComp = std::dynamic_pointer_cast<ModelAPI_ResultCompSolid>(myObject);
+    if (!aComp || aComp->numberOfSubs() == 0 || aComp->ModelAPI_ResultCompSolid::isConcealed())
+      aRes->setIsConcealed(false);
   }
 }