]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2099 Multi-selection with Shift button works incorrect during partition
authornds <nds@opencascade.com>
Fri, 7 Apr 2017 06:07:29 +0000 (09:07 +0300)
committernds <nds@opencascade.com>
Fri, 7 Apr 2017 06:07:48 +0000 (09:07 +0300)
src/XGUI/XGUI_Displayer.cpp

index dafd6dd98246261e97fd705e1bee84c3c9d399e4..c5aa8825092ac79841fa885870864c7ea171c2bc 100644 (file)
@@ -1431,6 +1431,14 @@ void XGUI_Displayer::getPresentations(const ObjectPtr& theObject,
   ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(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<ModelAPI_ResultCompSolid>(aResult);
+      if (aCompSolid.get() && aCompSolid->numberOfSubs() > 0) {
+        aAISObj = getAISObject(aCompSolid->subResult(0));
+      }
+    }
     if (aAISObj.get() != NULL) {
       Handle(AIS_InteractiveObject) anAIS = aAISObj->impl<Handle(AIS_InteractiveObject)>();
       if (!anAIS.IsNull() && !thePresentations.Contains(anAIS))