From: nds Date: Fri, 7 Apr 2017 06:07:29 +0000 (+0300) Subject: Issue #2099 Multi-selection with Shift button works incorrect during partition X-Git-Tag: V_2.7.0~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=802d0a144b6a4030a2281b85ca843ec1e2893d83;p=modules%2Fshaper.git Issue #2099 Multi-selection with Shift button works incorrect during partition --- 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))