X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FModel%2FModel_ResultCompSolid.cpp;h=c613cd29f3d88b13eb75a473781ff7e8dda03cd7;hb=fe8cab988ae59927f68da8e184cce6767e052206;hp=823001cd6bff70b05f80e1537e277138da873250;hpb=93d261c062c12388f4420043776e8ee19ddceaa0;p=modules%2Fshaper.git diff --git a/src/Model/Model_ResultCompSolid.cpp b/src/Model/Model_ResultCompSolid.cpp index 823001cd6..c613cd29f 100755 --- a/src/Model/Model_ResultCompSolid.cpp +++ b/src/Model/Model_ResultCompSolid.cpp @@ -79,12 +79,13 @@ void Model_ResultCompSolid::colorConfigInfo(std::string& theSection, std::string theDefault = DEFAULT_COLOR(); } -bool Model_ResultCompSolid::setDisabled(std::shared_ptr theThis, const bool theFlag) +bool Model_ResultCompSolid::setDisabled(std::shared_ptr 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