From c270956cd6bac9d1f3899999f4090d05339e5e69 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20Ribes?= Date: Thu, 24 Feb 2011 16:39:55 +0100 Subject: [PATCH] Retablissement de la selection lors de l'activation du module --- src/daSalome/daGUI/daEficasWrapper/adaoEficasWrapper.py | 7 +++++++ src/daSalome/daGUI/daGuiImpl/adaoGuiManager.py | 8 ++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) 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 ####### # -- 2.39.2