From 802d0a144b6a4030a2281b85ca843ec1e2893d83 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 7 Apr 2017 09:07:29 +0300 Subject: [PATCH] Issue #2099 Multi-selection with Shift button works incorrect during partition --- src/XGUI/XGUI_Displayer.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/XGUI/XGUI_Displayer.cpp b/src/XGUI/XGUI_Displayer.cpp index dafd6dd98..c5aa88250 100644 --- a/src/XGUI/XGUI_Displayer.cpp +++ b/src/XGUI/XGUI_Displayer.cpp @@ -1431,6 +1431,14 @@ void XGUI_Displayer::getPresentations(const ObjectPtr& theObject, ResultPtr aResult = std::dynamic_pointer_cast(theObject); if (aResult.get()) { AISObjectPtr aAISObj = getAISObject(aResult); + if (aAISObj.get() == NULL) { + // if result is a result of a composite feature, it is visualized by visualization of + // composite children, so we should get one of this presentations + ResultCompSolidPtr aCompSolid = std::dynamic_pointer_cast(aResult); + if (aCompSolid.get() && aCompSolid->numberOfSubs() > 0) { + aAISObj = getAISObject(aCompSolid->subResult(0)); + } + } if (aAISObj.get() != NULL) { Handle(AIS_InteractiveObject) anAIS = aAISObj->impl(); if (!anAIS.IsNull() && !thePresentations.Contains(anAIS)) -- 2.39.2