mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +01:00
Changed the sorting function.
This commit is contained in:
parent
3319e2562d
commit
0ddb356c0b
@ -196,12 +196,12 @@ class Group(object):
|
|||||||
def getValues(self, askChildren=False):
|
def getValues(self, askChildren=False):
|
||||||
L = []
|
L = []
|
||||||
items = self.values.items()
|
items = self.values.items()
|
||||||
items.sort()
|
utils.sortBy(lambda (k, _): (k.lower(), len(k), k), items)
|
||||||
for (name, value) in items:
|
for (name, value) in items:
|
||||||
L.append(('%s.%s' % (self.getName(), name), str(value)))
|
L.append(('%s.%s' % (self.getName(), name), str(value)))
|
||||||
if askChildren:
|
if askChildren:
|
||||||
items = self.children.items()
|
items = self.children.items()
|
||||||
items.sort()
|
utils.sortBy(lambda (k, _): (k.lower(), len(k), k), items)
|
||||||
for (_, child) in items:
|
for (_, child) in items:
|
||||||
L.extend(child.getValues(askChildren))
|
L.extend(child.getValues(askChildren))
|
||||||
return L
|
return L
|
||||||
|
Loading…
Reference in New Issue
Block a user