Salome HOME
Issue #2155 Trim removes multi-rotation constraint, undo leads to wrong DOF
[modules/shaper.git] / src / Model / Model_ResultCompSolid.cpp
index 823001cd6bff70b05f80e1537e277138da873250..c613cd29f3d88b13eb75a473781ff7e8dda03cd7 100755 (executable)
@@ -79,12 +79,13 @@ void Model_ResultCompSolid::colorConfigInfo(std::string& theSection, std::string
   theDefault = DEFAULT_COLOR();
 }
 
-bool Model_ResultCompSolid::setDisabled(std::shared_ptr<ModelAPI_Result> theThis, const bool theFlag)
+bool Model_ResultCompSolid::setDisabled(std::shared_ptr<ModelAPI_Result> theThis,
+                                        const bool theFlag)
 {
   bool aChanged = ModelAPI_ResultBody::setDisabled(theThis, theFlag);
   if (aChanged) { // state is changed, so modifications are needed
     myBuilder->evolutionToSelection(theFlag);
-    updateSubs(shape()); // to set disabled/enabled 
+    updateSubs(shape()); // to set disabled/enabled
   }
   return aChanged;
 }
@@ -112,7 +113,7 @@ bool Model_ResultCompSolid::isConcealed()
         if (aResult) { // hidden unit must be redisplayed (hidden)
           ModelAPI_EventCreator::get()->sendDeleted(document(), (*aSubIter)->groupName());
           // redisplay for the viewer (it must be disappeared also)
-          static Events_ID EVENT_DISP = 
+          static Events_ID EVENT_DISP =
             Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
           ModelAPI_EventCreator::get()->sendUpdated(*aSubIter, EVENT_DISP);
         } else { // was not concealed become concealed => delete event
@@ -121,6 +122,10 @@ bool Model_ResultCompSolid::isConcealed()
         }
       }
     }
+    // update the display state of the subs: explicitly call Model_ResultBody::isConcealed
+    for(aSubIter = mySubs.cbegin(); aSubIter != mySubs.cend(); aSubIter++) {
+      (*aSubIter)->isConcealed();
+    }
   }
   return aResult;
 }
@@ -134,7 +139,7 @@ void Model_ResultCompSolid::setIsConcealed(const bool theValue)
         if (theValue) { // hidden unit must be redisplayed (hidden)
           ModelAPI_EventCreator::get()->sendDeleted(document(), (*aSubIter)->groupName());
           // redisplay for the viewer (it must be disappeared also)
-          static Events_ID EVENT_DISP = 
+          static Events_ID EVENT_DISP =
             Events_Loop::loop()->eventByName(EVENT_OBJECT_TO_REDISPLAY);
           ModelAPI_EventCreator::get()->sendUpdated(*aSubIter, EVENT_DISP);
         } else { // was not concealed become concealed => delete event