From: vsv Date: Tue, 31 Jul 2018 16:00:58 +0000 (+0300) Subject: Check visibility state all sub object for complex object X-Git-Tag: SHAPER_V9_1_0RC1~73^2~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=da30d453be8638a1031eb20b93c5a8cd52b1c1a8;p=modules%2Fshaper.git Check visibility state all sub object for complex object --- diff --git a/src/PartSet/PartSet_TreeNodes.cpp b/src/PartSet/PartSet_TreeNodes.cpp index 0eff4cb00..5e642c691 100644 --- a/src/PartSet/PartSet_TreeNodes.cpp +++ b/src/PartSet/PartSet_TreeNodes.cpp @@ -161,8 +161,13 @@ PartSet_ObjectNode::VisibilityState PartSet_ObjectNode::visibilityState() const if (aCompRes.get()) { VisibilityState aState = aCompRes->numberOfSubs(true) == 0 ? (aWork->isVisible(aCompRes) ? Visible : Hidden) : NoneState; - for (int i = 0; i < aCompRes->numberOfSubs(true); i++) { - ResultPtr aSubRes = aCompRes->subResult(i, true); + std::list aResultsList; + ModelAPI_Tools::allSubs(aCompRes, aResultsList); + + std::list::const_iterator aIt; + //for (int i = 0; i < aCompRes->numberOfSubs(true); i++) { + for (aIt = aResultsList.cbegin(); aIt != aResultsList.cend(); aIt++) { + ResultPtr aSubRes = (*aIt); // aCompRes->subResult(i, true); VisibilityState aS = aWork->isVisible(aSubRes) ? Visible : Hidden; if (aState == NoneState) aState = aS;