From: vsv Date: Thu, 5 Sep 2019 12:52:12 +0000 (+0300) Subject: Issue #2983: Synchronize visibility state on activation of SHAPER module X-Git-Tag: VEDF2019Lot4~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=68348d55f163db4bf58eabab1eed48b6126a4d5e;p=modules%2Fshaper.git Issue #2983: Synchronize visibility state on activation of SHAPER module --- diff --git a/src/SHAPERGUI/SHAPERGUI.cpp b/src/SHAPERGUI/SHAPERGUI.cpp index 5cc4874a1..5b69d3593 100644 --- a/src/SHAPERGUI/SHAPERGUI.cpp +++ b/src/SHAPERGUI/SHAPERGUI.cpp @@ -285,7 +285,7 @@ bool SHAPERGUI::activateModule(SUIT_Study* theStudy) ViewManagerList OCCViewManagers; application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers); if (OCCViewManagers.size() > 0) { - mySelector = createSelector(OCCViewManagers.first()); + onViewManagerAdded(OCCViewManagers.first()); } } // it should be performed after the selector creation in order to have AISContext diff --git a/src/XGUI/XGUI_Workshop.cpp b/src/XGUI/XGUI_Workshop.cpp index 319b9fa48..3fadef034 100644 --- a/src/XGUI/XGUI_Workshop.cpp +++ b/src/XGUI/XGUI_Workshop.cpp @@ -2793,8 +2793,12 @@ void XGUI_Workshop::synchronizeResultTree(const ResultBodyPtr& theRes, bool theU if (aRes.get()) synchronizeResultTree(aRes, theUpdateViewer); } - else - myDisplayer->display(theRes, theUpdateViewer); + else { + if (theRes->isDisplayed()) + myDisplayer->display(theRes, theUpdateViewer); + else + myDisplayer->erase(theRes, theUpdateViewer); + } } #endif