From: bourcier <> Date: Fri, 4 May 2007 07:40:08 +0000 (+0000) Subject: Correction du bug issue10681 REX Code_Aster. X-Git-Tag: mergedu070507versMaintenance^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=eefb08355162e4ec10eba7ae31861eeacf17b996;p=modules%2Feficas.git Correction du bug issue10681 REX Code_Aster. Ce bug a deja ete corrige dans la revision 1.11.4.3 de eficasSalome.py dans la branche V3_2_0_maintenance. --- diff --git a/src/EFICASGUI/eficasSalome.py b/src/EFICASGUI/eficasSalome.py index 3a4b3cc8..8cce7693 100644 --- a/src/EFICASGUI/eficasSalome.py +++ b/src/EFICASGUI/eficasSalome.py @@ -321,7 +321,8 @@ class MyEficas( Tkinter.Toplevel, eficas.EFICAS ): selMeshEntry, keep = diag.getUserSelection() return selMeshEntry, keep - def __selectMainShape( self, groupeMaNamesIn, groupeNoNamesIn ): + + def __selectMainShape( self, groupeMaNamesIn, groupeNoNamesIn, jdcID ): """ Sélection intéractive de la main shape """ @@ -337,34 +338,38 @@ class MyEficas( Tkinter.Toplevel, eficas.EFICAS ): for entry in entries: mainShapeEntry = studyManager.palStudy.getMainShapeEntry( entry ) if mainShapeEntry != entry: - mainShapes[ subShapeName ] = mainShapeEntry + if mainShapes.has_key(subShapeName): + mainShapes[ subShapeName ].append( mainShapeEntry ) + else: + mainShapes[ subShapeName ] = [ mainShapeEntry ] mainShapeEntries += [ mainShapeEntry ] - + if mainShapes: diag = SelectMainShapeDiagImpl( mainShapeEntries, self.parent ) if diag.exec_loop() == qt.QDialog.Accepted: selectedMainShape = diag.getUserSelection() print 'main shape user selection ->',selectedMainShape + # added by _CS_cbo issue10681 REX + self.mainShapeEntries[ jdcID ] = selectedMainShape # filtre sur la main shape sélectionnée for name in groupeMaNamesIn: try: - if mainShapes[ name ] == selectedMainShape: + if selectedMainShape in mainShapes[ name ] : groupeMaNamesOut += [ name ] except: - pass - + pass + for name in groupeNoNamesIn: try: - if mainShapes[ name ] == selectedMainShape: + if selectedMainShape in mainShapes[ name ] : groupeNoNamesOut += [ name ] except: - pass - + pass + return groupeMaNamesOut, groupeNoNamesOut - - + def __selectShape( self, jdcID, selectedEntry, kwType = None ): """ @@ -609,7 +614,7 @@ class MyEficas( Tkinter.Toplevel, eficas.EFICAS ): # mise à jours de la liste des sous-géométrie ( self.subShapes ) if not self.mainShapeEntries.has_key( jdcID ): # l'utilisateur n'a sélectionné aucune sous-géométrie et donc pas de géométrie principale - groupeMaNames, groupeNoNames = self.__selectMainShape( groupeMaNames, groupeNoNames ) + groupeMaNames, groupeNoNames = self.__selectMainShape( groupeMaNames, groupeNoNames, jdcID ) if groupeMaNames or groupeNoNames: print 'CS_pbruno createOrUpdateMesh groupeMaNames', groupeMaNames