From: vsv Date: Fri, 22 Apr 2016 15:06:08 +0000 (+0300) Subject: Issue #1433: Show CompSolid sub objects X-Git-Tag: V_2.3.0~123 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e11216ab3e621518fd7a16daf7aaee48f1ac8c46;p=modules%2Fshaper.git Issue #1433: Show CompSolid sub objects --- diff --git a/src/XGUI/XGUI_SelectionMgr.cpp b/src/XGUI/XGUI_SelectionMgr.cpp index ff8e2da7f..3f692ff25 100755 --- a/src/XGUI/XGUI_SelectionMgr.cpp +++ b/src/XGUI/XGUI_SelectionMgr.cpp @@ -19,6 +19,7 @@ #include #include #include +#include #include @@ -107,10 +108,21 @@ void XGUI_SelectionMgr::onObjectBrowserSelection() aFeature = std::dynamic_pointer_cast(aObject); if (aFeature.get()) { const std::list> aResList = aFeature->results(); + ResultPtr aResult; + ResultCompSolidPtr aCompSolid; std::list::const_iterator aIt; for (aIt = aResList.cbegin(); aIt != aResList.cend(); ++aIt) { - aSelectedPrs.append(std::shared_ptr( - new ModuleBase_ViewerPrs((*aIt), GeomShapePtr(), NULL))); + aResult = (*aIt); + aCompSolid = std::dynamic_pointer_cast(aResult); + if (aCompSolid.get()) { + for (int i = 0; i < aCompSolid->numberOfSubs(); i++) { + aSelectedPrs.append(std::shared_ptr( + new ModuleBase_ViewerPrs(aCompSolid->subResult(i), GeomShapePtr(), NULL))); + } + } else { + aSelectedPrs.append(std::shared_ptr( + new ModuleBase_ViewerPrs(aResult, GeomShapePtr(), NULL))); + } } } }