From: vsv Date: Fri, 12 Sep 2014 14:00:13 +0000 (+0400) Subject: Issue #124: Hide dock windows in Salome on deactivation of module X-Git-Tag: V_0.4.4~64 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fcacc8d9ca78390be8f3ab7af4f459aea438c7cd;p=modules%2Fshaper.git Issue #124: Hide dock windows in Salome on deactivation of module --- diff --git a/src/NewGeom/NewGeom_Module.cpp b/src/NewGeom/NewGeom_Module.cpp index 023a1ffb1..412407827 100644 --- a/src/NewGeom/NewGeom_Module.cpp +++ b/src/NewGeom/NewGeom_Module.cpp @@ -109,6 +109,15 @@ bool NewGeom_Module::activateModule(SUIT_Study* theStudy) setMenuShown(true); setToolShown(true); + QObject* aObj = myWorkshop->objectBrowser()->parent(); + QDockWidget* aObjDoc = dynamic_cast(aObj); + if (aObjDoc) { + QAction* aViewAct = aObjDoc->toggleViewAction(); + aViewAct->setEnabled(true); + myWorkshop->objectBrowser()->setVisible(true); + aObjDoc->setVisible(true); + } + if (!mySelector) { ViewManagerList OCCViewManagers; application()->viewManagers(OCCViewer_Viewer::Type(), OCCViewManagers); @@ -135,6 +144,19 @@ bool NewGeom_Module::deactivateModule(SUIT_Study* theStudy) { setMenuShown(false); setToolShown(false); + + myWorkshop->propertyPanel()->setVisible(false); + desktop()->removeDockWidget(myWorkshop->propertyPanel()); + + QObject* aObj = myWorkshop->objectBrowser()->parent(); + QDockWidget* aObjDoc = dynamic_cast(aObj); + if (aObjDoc) { + aObjDoc->setVisible(false); + myWorkshop->objectBrowser()->setVisible(false); + QAction* aViewAct = aObjDoc->toggleViewAction(); + aViewAct->setEnabled(false); + } + //myWorkshop->contextMenuMgr()->disconnectViewer(); return LightApp_Module::deactivateModule(theStudy); }