]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/SHAPERGUI/SHAPERGUI.cpp
Salome HOME
Copyright update 2020
[modules/shaper.git] / src / SHAPERGUI / SHAPERGUI.cpp
index 51ff98cd9b89860cdda48cd7f54d79a0eaa7c2df..0cd96374cdeb1a27184df9232c583c408c1a5c22 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -136,7 +136,7 @@ private:
 SHAPERGUI::SHAPERGUI()
     : LightApp_Module("SHAPER"),
       mySelector(0), myIsOpened(0), myPopupMgr(0), myIsInspectionVisible(false),
-  myInspectionPanel(0), myIsToolbarsModified(false)
+  myInspectionPanel(0), myIsFacesPanelVisible(false), myIsToolbarsModified(false)
 {
   myWorkshop = new XGUI_Workshop(this);
   connect(myWorkshop, SIGNAL(commandStatusUpdated()),
@@ -277,10 +277,16 @@ bool SHAPERGUI::activateModule(SUIT_Study* theStudy)
 
     if (!myInspectionPanel) {
       myInspectionPanel = myWorkshop->inspectionPanel();
-      connect(myInspectionPanel->toggleViewAction(), SIGNAL(toggled(bool)), this, SLOT(onWhatIs(bool)));
+      connect(myInspectionPanel->toggleViewAction(), SIGNAL(toggled(bool)),
+              this, SLOT(onWhatIs(bool)));
     }
     myInspectionPanel->toggleViewAction()->setVisible(true);
 
+    myWorkshop->facesPanel()->toggleViewAction()->setVisible(true);
+    if (myIsFacesPanelVisible)
+      myWorkshop->facesPanel()->show();
+    myWorkshop->propertyPanel()->toggleViewAction()->setVisible(true);
+
     if (!mySelector) {
       ViewManagerList OCCViewManagers;
       application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers);
@@ -394,6 +400,13 @@ bool SHAPERGUI::deactivateModule(SUIT_Study* theStudy)
   myInspectionPanel->hide();
   myInspectionPanel->toggleViewAction()->setVisible(false);
 
+  myIsFacesPanelVisible = myWorkshop->facesPanel()->isVisible();
+  myWorkshop->facesPanel()->hide();
+  myWorkshop->facesPanel()->toggleViewAction()->setVisible(false);
+
+  myWorkshop->propertyPanel()->hide();
+  myWorkshop->propertyPanel()->toggleViewAction()->setVisible(false);
+
   // the active operation should be stopped for the next activation.
   // There should not be active operation and visualized preview.
   // Abort operation should be performed before the selection's remove