From: W. Trevor King Date: Sat, 7 Aug 2010 16:12:24 +0000 (-0400) Subject: Don't number properties in if count == 1 in gui.panel.propertyeditor. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=dadbd81e6d41bfb8c6fd22004d2d12652cd5fca7;p=hooke.git Don't number properties in if count == 1 in gui.panel.propertyeditor. The zeros in the name are distracting and unnecessary. --- diff --git a/hooke/ui/gui/panel/propertyeditor.py b/hooke/ui/gui/panel/propertyeditor.py index 4c45891..3bd571f 100644 --- a/hooke/ui/gui/panel/propertyeditor.py +++ b/hooke/ui/gui/panel/propertyeditor.py @@ -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]