From 0bc4d77344f249d7e3c0adb2b2ea58d74f2d02ea Mon Sep 17 00:00:00 2001 From: Stefan Pluecken Date: Wed, 4 Nov 2009 16:07:10 +0100 Subject: bug #258 sort ConfigSatList properly --- lib/python/Components/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100755 => 100644 lib/python/Components/config.py (limited to 'lib/python/Components/config.py') diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py old mode 100755 new mode 100644 index e249caf4..49501f95 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -1148,7 +1148,10 @@ class ConfigSatlist(ConfigSelection): def __init__(self, list, default = None): if default is not None: default = str(default) - ConfigSelection.__init__(self, choices = [(str(orbpos), desc) for (orbpos, desc, flags) in list], default = default) + choices = [(str(orbpos), desc) for (orbpos, desc, flags) in list] + choices.sort(key = lambda x: int(x[0])) + + ConfigSelection.__init__(self, choices = choices, default = default) def getOrbitalPosition(self): if self.value == "": -- cgit v1.2.3