Support putting class and instances into UI Groups

This commit is contained in:
Florian Festi 2017-03-19 07:34:06 +01:00
parent 8e65298c6b
commit f9c0cb8cab
1 changed files with 1 additions and 1 deletions

View File

@ -17,7 +17,7 @@ class UIGroup:
def add(self, box):
self.generators.append(box)
self.generators.sort(key=lambda b:b.__class__.__name__)
self.generators.sort(key=lambda b:getattr(b, '__name__', None) or b.__class__.__name__)
ui_groups = [
UIGroup("Box", "Boxes"),