From 99528b907313467846ff3c38a1da6807fa65c3f1 Mon Sep 17 00:00:00 2001 From: "pascale.noyret" Date: Thu, 14 Feb 2019 15:44:36 +0100 Subject: [PATCH] rendVisisblesLesCaches si configuration --- InterfaceQT4/configuration.py | 1 + InterfaceQT4/monChoixCommande.py | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/InterfaceQT4/configuration.py b/InterfaceQT4/configuration.py index 8110fd46..a709ce51 100644 --- a/InterfaceQT4/configuration.py +++ b/InterfaceQT4/configuration.py @@ -130,6 +130,7 @@ class configBase(object): self.withXSD=False self.afficheIhm=True self.closeParenthese=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 -- 2.39.2