]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #2582: Show/Hide inspection panel on activate/deactivate SHAPER module.
authorvsv <vsv@opencascade.com>
Mon, 27 Aug 2018 14:34:14 +0000 (17:34 +0300)
committervsv <vsv@opencascade.com>
Mon, 27 Aug 2018 14:34:14 +0000 (17:34 +0300)
src/SHAPERGUI/SHAPERGUI.cpp

index ad28095355ccf4fd4e67b5d96671acc01da4364a..9fe4223b1489f22dbb23155563de1956701be883 100644 (file)
@@ -207,6 +207,13 @@ bool SHAPERGUI::activateModule(SUIT_Study* theStudy)
       desktop()->tabifyDockWidget(aObjDoc, myWorkshop->propertyPanel());
     }
 
+    DockWidget* aInspection = myWorkshop->inspectionPanel();
+    if (aInspection) {
+      QAction* aViewAct = aInspection->toggleViewAction();
+      aViewAct->setEnabled(true);
+      aInspection->setVisible(true);
+    }
+
     if (!mySelector) {
       ViewManagerList OCCViewManagers;
       application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers);
@@ -306,6 +313,12 @@ bool SHAPERGUI::deactivateModule(SUIT_Study* theStudy)
     QAction* aViewAct = aObjDoc->toggleViewAction();
     aViewAct->setEnabled(false);
   }
+  DockWidget* aInspection = myWorkshop->inspectionPanel();
+  if (aInspection) {
+    aInspection->setVisible(false);
+    QAction* aViewAct = aInspection->toggleViewAction();
+    aViewAct->setEnabled(false);
+  }
 
   // the active operation should be stopped for the next activation.
   // There should not be active operation and visualized preview.