From c3c00a15849bc9113fabe42e42e3fc40bd878f79 Mon Sep 17 00:00:00 2001 From: nds Date: Tue, 1 Mar 2016 17:50:00 +0300 Subject: [PATCH] Issue 1347: correction to fit all in the viewer the first visualized group result(it was implemented for body results only) --- src/XGUI/XGUI_WorkshopListener.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/XGUI/XGUI_WorkshopListener.cpp b/src/XGUI/XGUI_WorkshopListener.cpp index 577e70da2..57025c6c7 100755 --- a/src/XGUI/XGUI_WorkshopListener.cpp +++ b/src/XGUI/XGUI_WorkshopListener.cpp @@ -575,9 +575,16 @@ bool XGUI_WorkshopListener::displayObject(ObjectPtr theObj, bool& theFirstVisual aDisplayed = aDisplayer->display(theObj, false); if (aNb == 0) theFirstVisualizedBody = true; - } else + } else { aDisplayed = aDisplayer->display(theObj, false); - + if (aDisplayed) { + ResultPtr aResult = std::dynamic_pointer_cast(theObj); + if (aResult.get() != NULL) { + std::shared_ptr aShapePtr = ModelAPI_Tools::shape(aResult); + theFirstVisualizedBody = aShapePtr.get() != NULL; + } + } + } return aDisplayed; } -- 2.39.2