]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2983: Synchronize visibility state on activation of SHAPER module
authorvsv <vsv@opencascade.com>
Thu, 5 Sep 2019 12:52:12 +0000 (15:52 +0300)
committervsv <vsv@opencascade.com>
Thu, 5 Sep 2019 12:52:31 +0000 (15:52 +0300)
src/SHAPERGUI/SHAPERGUI.cpp
src/XGUI/XGUI_Workshop.cpp

index 5cc4874a14a60268c139d9376e280b386394a069..5b69d3593ffb8e02830a296173cbdf0abf0185bb 100644 (file)
@@ -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
index 319b9fa48be8e9e4e6462a74797e6a260866e5f5..3fadef034d0da0cbc8375f406e69b3ee302a49ab 100644 (file)
@@ -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