From: pascale.noyret Date: Tue, 12 Mar 2019 12:42:47 +0000 (+0100) Subject: merge avec la 8.5 et les modifs pour Telemac X-Git-Tag: merge_8.5~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f919e088e131c85922dc124e28e2a80f645a6bf0;p=tools%2Feficas.git merge avec la 8.5 et les modifs pour Telemac --- diff --git a/InterfaceQT4/browser.py b/InterfaceQT4/browser.py index c4df0643..7d4b71f7 100644 --- a/InterfaceQT4/browser.py +++ b/InterfaceQT4/browser.py @@ -760,6 +760,7 @@ class JDCNode(QTreeWidgetItem,GereRegles): for noeud in liste : noeud.setTextColor( 0,Qt.blue ) labeltext,fonte,couleur = noeud.item.getLabelText() + if item.nom != tr(item.nom) : labeltext = str(tr(item.nom)+" :") noeud.setText(0, labeltext) self.appliEficas.listeNoeudsColores.append(noeud) diff --git a/InterfaceQT4/compocomm.py b/InterfaceQT4/compocomm.py index cedfadce..8a83ce8f 100644 --- a/InterfaceQT4/compocomm.py +++ b/InterfaceQT4/compocomm.py @@ -53,7 +53,7 @@ class Node(browser.JDCNode,typeNode.PopUpMenuNodePartiel): """ """ debComm=self.item.getText() - self.setText(1,debComm) + self.setText(1,tr(debComm)) diff --git a/InterfaceQT4/configuration.py b/InterfaceQT4/configuration.py index 0c094e4f..d8eefdc8 100644 --- a/InterfaceQT4/configuration.py +++ b/InterfaceQT4/configuration.py @@ -135,6 +135,7 @@ class configBase(object): self.enleverSupprimer=False self.ajoutExecution=False self.utilParExtensions=False + self.rendVisiblesLesCaches=False diff --git a/InterfaceQT4/monChoixCommande.py b/InterfaceQT4/monChoixCommande.py index 5ebb70c4..7d41beec 100644 --- a/InterfaceQT4/monChoixCommande.py +++ b/InterfaceQT4/monChoixCommande.py @@ -159,11 +159,15 @@ class MonChoixCommande(Ui_ChoixCommandes,QWidget): def creeListeCommande(self,filtre): listeGroupes,dictGroupes=self.jdc.getGroups() sensibleALaCasse=self.RBCasse.isChecked() - if "CACHE" in dictGroupes: - aExclure=dictGroupes["CACHE"] - else: - aExclure=() + if "CACHE" in dictGroupes: aExclure=list(dictGroupes["CACHE"]) + else: aExclure=() listeACreer=[] + listeEtapesDejaPresentes=[] + if self.editor.maConfiguration.rendVisiblesLesCaches : + for e in self.jdc.etapes: + listeEtapesDejaPresentes.append(e.nom) + for c in aExclure : + if c not in listeEtapesDejaPresentes : aExclure.remove(c) for l in self.jdc.getListeCmd(): if l not in aExclure : if sensibleALaCasse and (filtre != None and not filtre in l) : continue diff --git a/InterfaceQT4/monRecherche.py b/InterfaceQT4/monRecherche.py index 059456cc..16fdfaf3 100644 --- a/InterfaceQT4/monRecherche.py +++ b/InterfaceQT4/monRecherche.py @@ -59,6 +59,6 @@ class DRecherche(Ui_desRecherche ,QDialog): def recherche(self): self.motAChercher=self.LERecherche.text() - self.listeTrouvee=self.tree.findItems(self.motAChercher,Qt.MatchContains|Qt.MatchRecursive,1) + self.listeTrouvee=self.tree.findItems(self.motAChercher,Qt.MatchContains|Qt.MatchRecursive,0) self.surLigne=0 diff --git a/InterfaceQT4/viewManager.py b/InterfaceQT4/viewManager.py index 0050a294..de4499c0 100644 --- a/InterfaceQT4/viewManager.py +++ b/InterfaceQT4/viewManager.py @@ -85,16 +85,16 @@ class MyViewManager(object): if maPage : self.myQtab.setTabText(self.myQtab.indexOf(maPage),os.path.basename(fichier)) return result - def closeTab(self): - self.handleClose() + def closeTab(self,indexAFermer): + self.handleClose(indexAFermer = indexAFermer) - def handleClose(self,doitSauverRecent = 1,texte=tr('&Quitter')): + def handleClose(self,doitSauverRecent = 1,texte=tr('&Quitter'),indexAFermer=None): if doitSauverRecent : self.appliEficas.sauveRecents() - index=self.myQtab.currentIndex() + if indexAFermer == None :index=self.myQtab.currentIndex() + else : index = indexAFermer if index < 0 : return res=self.checkDirty(self.dict_editors[index],texte) if res == 2 : return 2 # l utilisateur a annule - index=self.myQtab.currentIndex() idx=index while idx < len(self.dict_editors) -1 : self.dict_editors[idx]=self.dict_editors[idx+1] diff --git a/convert/convert_TELEMAC.py b/convert/convert_TELEMAC.py index 59cee25c..2e934c09 100644 --- a/convert/convert_TELEMAC.py +++ b/convert/convert_TELEMAC.py @@ -294,7 +294,9 @@ class TELEMACparser(Pythonparser): self.textePy += ");\n" - appli.listeTelemac=self.dictSimp + # ne sert plus + #appli.listeTelemac=self.dictSimp + appli.listeTelemac={} if 'debut' in dicoComment : commentaire="COMMENTAIRE("+repr(dicoComment['debut'])+")\n" self.textePy=commentaire+self.textePy @@ -458,7 +460,6 @@ class TELEMACparser(Pythonparser): def tri(self, listeIn): - if len(listeIn) == 0 : return listeIn if len(listeIn) == 1 : return listeIn if self.Ordre_Des_Commandes == None : return listeIn listeOut=[listeIn[0],] diff --git a/generator/generator_TELEMAC.py b/generator/generator_TELEMAC.py index e4626dc1..3b52f688 100644 --- a/generator/generator_TELEMAC.py +++ b/generator/generator_TELEMAC.py @@ -59,7 +59,7 @@ class TELEMACGenerator(PythonGenerator): #---------------------------------------------------------------------------------------- def gener(self,obj,format='brut',config=None,appli=None,statut="Leger"): - + self.statut = statut self.langue = appli.langue try : self.TelemacdicoEn = appli.readercata.TelemacdicoEn @@ -136,8 +136,9 @@ class TELEMACGenerator(PythonGenerator): def writeDefault(self,fn) : self.texteDico+='&ETA\n' - if self.statut == 'Leger' : extension = ".cas" - else : extension = "_complet.cas" + #if self.statut == 'Leger' : extension = ".Lcas" + #else : extension = ".cas" + extension=".cas" fileDico = fn[:fn.rfind(".")] + extension f = open( str(fileDico), 'w') f.write( self.texteDico ) @@ -180,7 +181,6 @@ class TELEMACGenerator(PythonGenerator): if hasattr(obj.definition,'defaut') and (obj.definition.defaut == obj.valeur) and (obj.nom not in self.listeTelemac) : return s if hasattr(obj.definition,'defaut') and obj.definition.defaut != None and (type(obj.valeur) == tuple or type(obj.valeur) == list) and (tuple(obj.definition.defaut) == tuple(obj.valeur)) and (obj.nom not in self.listeTelemac) : return s - #nomMajuscule=obj.nom.upper() #nom=nomMajuscule.replace('_',' ')