From: Pascale Noyret Date: Mon, 29 Oct 2007 12:44:14 +0000 (+0000) Subject: ajout de unit pour les includes X-Git-Tag: V1_13b1~36 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=57b525eacec9e97af519fe615c68175b215eb507;p=tools%2Feficas.git ajout de unit pour les includes --- diff --git a/InterfaceQT/editor.py b/InterfaceQT/editor.py index a1a079fa..f2031a85 100644 --- a/InterfaceQT/editor.py +++ b/InterfaceQT/editor.py @@ -30,8 +30,8 @@ class JDCEditor(QSplitter): Editeur de jdc """ - def __init__(self,fn = None, jdc = None ,parent=None, editor = None): - #-------------------------------------------------------------------# + def __init__(self,fn = None, jdc = None ,parent=None, editor = None, units = None): + #--------------------------------------------------------------------------------# QSplitter.__init__(self, parent,'') @@ -79,6 +79,11 @@ class JDCEditor(QSplitter): self.fileInfo.setCaching(0) if editor is None: self.jdc = self.readFile(self.fileName) + print "uuuuuuuuuuuuuuuuuuuuuuuuuuuu" + print self.fileName + if units is not None: + self.jdc.recorded_units=units + self.jdc.old_recorded_units=units else: self.top = editor.top self.code = editor.code @@ -96,7 +101,7 @@ class JDCEditor(QSplitter): self.jdc = editor.jdc else: if not self.jdc: # nouveau jdc - self.jdc = self._newJDC() + self.jdc = self._newJDC(units=units) if self.jdc: self.jdc.appli = self @@ -170,9 +175,9 @@ class JDCEditor(QSplitter): self.setCaption(cap) self.emit(PYSIGNAL('captionChanged'), (cap, self)) - #-------------------# - def _newJDC( self ): - #-------------------# + #--------------------------------# + def _newJDC( self ,units = None): + #--------------------------------# """ Initialise un nouveau JDC vierge """ @@ -183,6 +188,9 @@ class JDCEditor(QSplitter): cata_ord_dico=self.readercata.cata_ordonne_dico, rep_mat=self.CONFIGURATION.rep_mat ) + if units is not None: + jdc.recorded_units=units + jdc.old_recorded_units=units jdc.analyse() return jdc @@ -615,9 +623,6 @@ class JDCEditor(QSplitter): """ return self.saveFile(1, path) - - - if __name__=='__main__': if hasattr(prefs,'encoding'):