Don't number properties in if count == 1 in gui.panel.propertyeditor.
authorW. Trevor King <wking@drexel.edu>
Sat, 7 Aug 2010 16:12:24 +0000 (12:12 -0400)
committerW. Trevor King <wking@drexel.edu>
Sat, 7 Aug 2010 16:12:24 +0000 (12:12 -0400)
The zeros in the name are distracting and unnecessary.

hooke/ui/gui/panel/propertyeditor.py

index 4c458912f842a91d6b5d73625caebc450a01ae55..3bd571f24b443f3071f4e43e8f2201715ef8035b 100644 (file)
@@ -64,7 +64,10 @@ def props_from_argument(argument, curves=None, playlists=None):
         kwargs['choices'] = choices
     else:
         raise NotImplementedError(argument.type)
-    labels = ['%s %d' % (argument.name, i) for i in range(argument.count)]
+    if argument.count == 1:
+        labels = [argument.name]
+    else:
+        labels = ['%s %d' % (argument.name, i) for i in range(argument.count)]
     return [(label, _class(label=label, **kwargs)) for label in labels]