From f26d7138b86578771c1fc6a0d8d453f6c3044541 Mon Sep 17 00:00:00 2001 From: nds Date: Thu, 28 Apr 2016 16:31:21 +0300 Subject: [PATCH] Issue #1037 : do not find model indices for the same result. If selection mode is face, for each result it will be placed in the map 6 times. --- src/XGUI/XGUI_SelectionMgr.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/XGUI/XGUI_SelectionMgr.cpp b/src/XGUI/XGUI_SelectionMgr.cpp index 3f692ff25..8e614e30b 100755 --- a/src/XGUI/XGUI_SelectionMgr.cpp +++ b/src/XGUI/XGUI_SelectionMgr.cpp @@ -145,7 +145,8 @@ void XGUI_SelectionMgr::onViewerSelection() QList aPresentations = selection()->getSelected(ModuleBase_ISelection::Viewer); foreach(ModuleBase_ViewerPrsPtr aPrs, aPresentations) { if (aPrs->object().get()) { - aFeatures.append(aPrs->object()); + if (!aFeatures.contains(aPrs->object())) + aFeatures.append(aPrs->object()); if (aPrs->shape().get()) { aResult = std::dynamic_pointer_cast(aPrs->object()); if (aResult.get()) { -- 2.39.2