mainShapes[ subShapeName ].append( mainShapeEntry )
else:
mainShapes[ subShapeName ] = [ mainShapeEntry ]
- mainShapeEntries += [ mainShapeEntry ]
+ if not mainShapeEntry in mainShapeEntries:
+ 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 selectedMainShape in mainShapes[ name ] :
- groupeMaNamesOut += [ name ]
- except:
- pass
-
- for name in groupeNoNamesIn:
- try:
- if selectedMainShape in mainShapes[ name ] :
- groupeNoNamesOut += [ name ]
- except:
- pass
+ if len(mainShapeEntries)>1:
+ diag = SelectMainShapeDiagImpl( mainShapeEntries, self.parent )
+
+ if diag.exec_loop() == qt.QDialog.Accepted:
+ selectedMainShape = diag.getUserSelection()
+ print 'main shape user selection ->',selectedMainShape
+
+ else:
+ selectedMainShape = mainShapeEntries[0]
+
+ self.mainShapeEntries[ jdcID ] = selectedMainShape
+
+ # filtre sur la main shape sélectionnée
+ for name in groupeMaNamesIn:
+ try:
+ if selectedMainShape in mainShapes[ name ] :
+ groupeMaNamesOut += [ name ]
+ except:
+ pass
+
+ for name in groupeNoNamesIn:
+ try:
+ if selectedMainShape in mainShapes[ name ] :
+ groupeNoNamesOut += [ name ]
+ except:
+ pass
return groupeMaNamesOut, groupeNoNamesOut