From e7f5fe8e1daa2d8c66f7c61bb70d8359a67378e6 Mon Sep 17 00:00:00 2001 From: vsv Date: Fri, 29 Apr 2016 16:52:34 +0300 Subject: [PATCH] Issue #1433: Selection synchronization --- src/Config/dataModel.xml | 2 +- src/XGUI/XGUI_SelectionMgr.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Config/dataModel.xml b/src/Config/dataModel.xml index c9742ab12..783b7b0e1 100644 --- a/src/Config/dataModel.xml +++ b/src/Config/dataModel.xml @@ -11,6 +11,6 @@ folder_features="ParametersMgr"/> - + \ No newline at end of file diff --git a/src/XGUI/XGUI_SelectionMgr.cpp b/src/XGUI/XGUI_SelectionMgr.cpp index 8e614e30b..8bc012412 100755 --- a/src/XGUI/XGUI_SelectionMgr.cpp +++ b/src/XGUI/XGUI_SelectionMgr.cpp @@ -113,15 +113,15 @@ void XGUI_SelectionMgr::onObjectBrowserSelection() std::list::const_iterator aIt; for (aIt = aResList.cbegin(); aIt != aResList.cend(); ++aIt) { aResult = (*aIt); + aSelectedPrs.append(std::shared_ptr( + new ModuleBase_ViewerPrs(aResult, GeomShapePtr(), NULL))); aCompSolid = std::dynamic_pointer_cast(aResult); if (aCompSolid.get()) { for (int i = 0; i < aCompSolid->numberOfSubs(); i++) { + ResultBodyPtr aResult = aCompSolid->subResult(i); aSelectedPrs.append(std::shared_ptr( - new ModuleBase_ViewerPrs(aCompSolid->subResult(i), GeomShapePtr(), NULL))); + new ModuleBase_ViewerPrs(aResult, aResult->shape(), NULL))); } - } else { - aSelectedPrs.append(std::shared_ptr( - new ModuleBase_ViewerPrs(aResult, GeomShapePtr(), NULL))); } } } -- 2.39.2