parameters.xml sort parameters by name, sort enums by value

This commit is contained in:
Daniel Agar 2017-11-22 02:05:43 -05:00
parent 698bc7d848
commit 85a7a0a86a
1 changed files with 2 additions and 6 deletions

View File

@ -31,8 +31,7 @@ class ParameterGroup(object):
object. Note that returned object is not a copy. Modifications affect object. Note that returned object is not a copy. Modifications affect
state of the parser. state of the parser.
""" """
return sorted(self.params, return sorted(self.params, key=lambda param: param.name)
key=lambda x: x.GetFieldValue("code"))
class Parameter(object): class Parameter(object):
""" """
@ -109,10 +108,7 @@ class Parameter(object):
""" """
Return list of existing value codes in convenient order Return list of existing value codes in convenient order
""" """
keys = self.values.keys() return sorted(self.values.keys(), key=float)
#keys = sorted(keys)
#keys = sorted(keys, key=lambda x: self.priority.get(x, 0), reverse=True)
return keys
def GetEnumValue(self, code): def GetEnumValue(self, code):
""" """