From: vsv Date: Wed, 9 Jan 2019 14:33:30 +0000 (+0300) Subject: Issue #2815: Select result presentation on feature selection X-Git-Tag: Jan2019~37 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a3d9aeae3c6a3391401dd2e9cad0b5f5fa56c5a1;p=modules%2Fshaper.git Issue #2815: Select result presentation on feature selection --- 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(); }