]> SALOME platform Git repositories - modules/adao.git/commitdiff
Salome HOME
Désactivation de la vue de ADAO lorsque le module n'est pas activé
authorAndré Ribes <andre.ribes@edf.fr>
Wed, 26 Jan 2011 13:09:43 +0000 (14:09 +0100)
committerAndré Ribes <andre.ribes@edf.fr>
Wed, 26 Jan 2011 13:09:43 +0000 (14:09 +0100)
src/daSalome/daGUI/daGuiImpl/ADAOGUI_impl.py
src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py

index 0c6446f2a1440976b3375d20593f3788368a029e..8168608acc9fc36bf1a6ec5470bd04ee58a1ef29 100644 (file)
@@ -98,6 +98,8 @@ def activate():
 
 # called when module is deactivated
 def deactivate():
+    ctx = _setContext( sgPyQt.getStudyId() )
+    ctx.actionImpl.deactivate()
     pass
 
 # called when active study is changed
index 3c98d52998e85c5a753c2d68f0ffcd51a926ec8b..e08249b988a551c930df67ecd46e5219bce39a29 100644 (file)
@@ -161,10 +161,16 @@ class AdaoGuiActionImpl(EficasObserver):
             wmType = "ADAO View"
             self.__Eficas_viewId = sgPyQt.createView(wmType, area)
             sgPyQt.setViewClosable(self.__Eficas_viewId, False)
+        self.__dlgEficasWrapper.setEnabled(True)
 
     def activate(self):
       self.showEficas()
 
+    def deactivate(self):
+      self.showEficas()
+      if self.__Eficas_viewId != -1:
+        self.__dlgEficasWrapper.setEnabled(False)
+
     # Actions from SALOME GUI
 
     def newAdaoCase(self):