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=013b48671a5799f2f05f36d05e04571018d89542;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]