From 013b48671a5799f2f05f36d05e04571018d89542 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sat, 7 Aug 2010 12:12:24 -0400 Subject: [PATCH] Don't number properties in if count == 1 in gui.panel.propertyeditor. The zeros in the name are distracting and unnecessary. --- hooke/ui/gui/panel/propertyeditor.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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] -- 2.26.2