]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue 1347: correction to fit all in the viewer the first visualized group result...
authornds <nds@opencascade.com>
Wed, 2 Mar 2016 04:30:08 +0000 (07:30 +0300)
committernds <nds@opencascade.com>
Wed, 2 Mar 2016 04:30:08 +0000 (07:30 +0300)
src/XGUI/XGUI_WorkshopListener.cpp

index 57025c6c7d096b4a1ab60f11f6286728ea45d55b..03aaf4fa1f10e729201c7bcaafa8a27d82a62145 100755 (executable)
@@ -29,6 +29,7 @@
 #include <ModelAPI_Feature.h>
 #include <ModelAPI_Data.h>
 #include <ModelAPI_ResultBody.h>
+#include <ModelAPI_ResultGroup.h>
 #include <ModelAPI_ResultCompSolid.h>
 #include <ModelAPI_Tools.h>
 
@@ -578,9 +579,9 @@ bool XGUI_WorkshopListener::displayObject(ObjectPtr theObj, bool& theFirstVisual
   } else {
     aDisplayed = aDisplayer->display(theObj, false);
     if (aDisplayed) {
-      ResultPtr aResult = std::dynamic_pointer_cast<ModelAPI_Result>(theObj);
-      if (aResult.get() != NULL) {
-        std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aResult);
+      ResultPtr aGroup = std::dynamic_pointer_cast<ModelAPI_ResultGroup>(theObj);
+      if (aGroup.get() != NULL) {
+        std::shared_ptr<GeomAPI_Shape> aShapePtr = ModelAPI_Tools::shape(aGroup);
           theFirstVisualizedBody = aShapePtr.get() != NULL;
       }
     }