From: André Ribes Date: Wed, 26 Jan 2011 13:09:43 +0000 (+0100) Subject: Désactivation de la vue de ADAO lorsque le module n'est pas activé X-Git-Tag: V6_4_0rc3~98 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3a30a7f992b357d7aeeac9fe5f9088dc5b24d1e1;p=modules%2Fadao.git Désactivation de la vue de ADAO lorsque le module n'est pas activé --- diff --git a/src/daSalome/daGUI/daGuiImpl/ADAOGUI_impl.py b/src/daSalome/daGUI/daGuiImpl/ADAOGUI_impl.py index 0c6446f..8168608 100644 --- a/src/daSalome/daGUI/daGuiImpl/ADAOGUI_impl.py +++ b/src/daSalome/daGUI/daGuiImpl/ADAOGUI_impl.py @@ -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 diff --git a/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py b/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py index 3c98d52..e08249b 100644 --- a/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py +++ b/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py @@ -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):