From f6e50ba452e4fb572aaba153e32a7ad8f6ff6ae8 Mon Sep 17 00:00:00 2001 From: Pascale Noyret Date: Fri, 18 Jun 2010 15:13:44 +0000 Subject: [PATCH] +sieurs eficas dans salome --- InterfaceQT4/editor.py | 36 +++++++++++++++++++----------------- InterfaceQT4/qtEficas.py | 2 +- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/InterfaceQT4/editor.py b/InterfaceQT4/editor.py index 86a466de..c33b4b87 100644 --- a/InterfaceQT4/editor.py +++ b/InterfaceQT4/editor.py @@ -82,13 +82,12 @@ class JDCEditor(QSplitter): try: self.CONFIGURATION.generator_module _module = __import__(self.CONFIGURATION.generator_module) - info = _module.entryPoint() - generator.plugins.addEntryPoint(info) + info = _module.entryPoint() + generator.plugins.addEntryPoint(info) except NameError: - pass + pass except: - #traceback.print_exc() - pass + traceback.print_exc() try: self.CONFIGURATION.convert_module @@ -98,8 +97,7 @@ class JDCEditor(QSplitter): except NameError: pass except: - #traceback.print_exc() - pass + traceback.print_exc() self.sb = None if hasattr(self.appliEficas,"statusBar"): @@ -117,7 +115,11 @@ class JDCEditor(QSplitter): #if not hasattr( readercata, 'reader' ) : # readercata.reader = readercata.READERCATA( self, self.appliEficas ) #self.readercata = readercata.reader - self.readercata = readercata.READERCATA( self, self.appliEficas ) + if not hasattr ( self.appliEficas, 'readercata'): + self.readercata = readercata.READERCATA( self, self.appliEficas ) + self.appliEficas.readercata=self.readercata + else : + self.readercata=self.appliEficas.readercata if self.readercata.fic_cata == None : return #Sortie Salome self.Commandes_Ordre_Catalogue =self.readercata.Commandes_Ordre_Catalogue @@ -681,15 +683,15 @@ class JDCEditor(QSplitter): except : pass - try : - self.tubePy=self.generator.getTubePy() - fileTube = fn[:fn.rfind(".")] + '.py' - if self.tubePy != '' : - f=open(fileTube,'w') - f.write(self.tubePy) - f.close() - except : - pass + #try : + # self.tubePy=self.generator.getTubePy() + # fileTube = fn[:fn.rfind(".")] + '.py' + # if self.tubePy != '' : + # f=open(fileTube,'w') + # f.write(self.tubePy) + # f.close() + #except : + # pass if self.salome : self.appliEficas.addJdcInSalome( self.fichier) diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index ab9fe572..36a92892 100644 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -55,7 +55,7 @@ class Appli(Ui_Eficas,QMainWindow): reload(sys) sys.setdefaultencoding(prefsCode.encoding) - QMainWindow.__init__(self) + QMainWindow.__init__(self,parent) Ui_Eficas.__init__(self) self.setupUi(self) self.ajoutIcones() -- 2.39.2