From: André Ribes Date: Thu, 24 Feb 2011 15:39:55 +0000 (+0100) Subject: Retablissement de la selection lors de l'activation du module X-Git-Tag: V6_4_0rc3~76 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c270956cd6bac9d1f3899999f4090d05339e5e69;p=modules%2Fadao.git Retablissement de la selection lors de l'activation du module --- diff --git a/src/daSalome/daGUI/daEficasWrapper/adaoEficasWrapper.py b/src/daSalome/daGUI/daEficasWrapper/adaoEficasWrapper.py index 5662506..3806147 100644 --- a/src/daSalome/daGUI/daEficasWrapper/adaoEficasWrapper.py +++ b/src/daSalome/daGUI/daEficasWrapper/adaoEficasWrapper.py @@ -151,6 +151,13 @@ class AdaoEficasWrapper(eficasSalome.MyEficas): break return rtn + def getCurrentEditor(self): + index = self.viewmanager.myQtab.currentIndex() + editor = None + if index >= 0: + editor = self.viewmanager.dict_editors[index] + return editor + diff --git a/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py b/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py index bce5d31..2fb51f5 100644 --- a/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py +++ b/src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py @@ -165,11 +165,15 @@ class AdaoCaseManager(EficasObserver): Cette méthode permet d'harmoniser la sélection dans l'étude grâce au tab courant d'Eficas """ - adaoLogger.error("harmonizeSelectionFromEficas NOT YET IMPLEMENTED") if self.cases: - pass # 1: Get current tab index in Eficas + editor = self.eficas_manager.getCurrentEditor() # 2: sync with SALOME GUI is a tab is opened + if editor: + for case_editor, adao_case in self.cases.iteritems(): + if case_editor is editor: + adaoGuiHelper.selectItem(adao_case.salome_study_item.GetID()) + break ####### #