From a3d9aeae3c6a3391401dd2e9cad0b5f5fa56c5a1 Mon Sep 17 00:00:00 2001 From: vsv Date: Wed, 9 Jan 2019 17:33:30 +0300 Subject: [PATCH] Issue #2815: Select result presentation on feature selection --- src/XGUI/XGUI_SelectionMgr.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/XGUI/XGUI_SelectionMgr.cpp b/src/XGUI/XGUI_SelectionMgr.cpp index a4cf3bbcb..4567f1b88 100755 --- a/src/XGUI/XGUI_SelectionMgr.cpp +++ b/src/XGUI/XGUI_SelectionMgr.cpp @@ -111,7 +111,6 @@ void XGUI_SelectionMgr::onObjectBrowserSelection() XGUI_Displayer* aDisplayer = myWorkshop->displayer(); if (!myWorkshop->operationMgr()->hasOperation()) { - QList aTmpList = aSelectedPrs; ObjectPtr aObject; FeaturePtr aFeature; // Select all results of a selected feature in viewer @@ -120,19 +119,18 @@ void XGUI_SelectionMgr::onObjectBrowserSelection() if (aObject.get()) { aFeature = std::dynamic_pointer_cast(aObject); if (aFeature.get()) { - std::list allRes; - ModelAPI_Tools::allResults(aFeature, allRes); - for(std::list::iterator aRes = allRes.begin(); aRes != allRes.end(); aRes++) { - aSelectedPrs.append(std::shared_ptr( - new ModuleBase_ViewerPrs(*aRes, GeomShapePtr(), NULL))); + std::list allRes; + ModelAPI_Tools::allResults(aFeature, allRes); + std::list::iterator aRes; + for(aRes = allRes.begin(); aRes != allRes.end(); aRes++) { + aSelectedPrs.append(std::shared_ptr( + new ModuleBase_ViewerPrs(*aRes, GeomShapePtr(), NULL))); } } } } - aDisplayer->setSelected(aTmpList); - } else { - aDisplayer->setSelected(aSelectedPrs); } + aDisplayer->setSelected(aSelectedPrs); emit selectionChanged(); } -- 2.39.2