summaryrefslogtreecommitdiff
path: root/ccm/Settings.py
diff options
context:
space:
mode:
Diffstat (limited to 'ccm/Settings.py')
-rw-r--r--ccm/Settings.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/ccm/Settings.py b/ccm/Settings.py
index 16b28b5..3f945cb 100644
--- a/ccm/Settings.py
+++ b/ccm/Settings.py
@@ -350,10 +350,14 @@ class RestrictedStringSetting(StockSetting):
return (str, column)
+ def GetItemText (self, val):
+ text = self.ItemsByValue.get(val)
+ if text is None:
+ return NAItemText
+ return self.SortedItems[text[1]][0]
+
def GetForRenderer(self):
- return [(self.SortedItems[self.ItemsByValue[val][1]][0] \
- if self.ItemsByValue.has_key(val) else NAItemText) \
- for val in self.Setting.Value]
+ return [self.GetItemText(val) for val in self.Setting.Value]
def _Read(self):
value = self.Get()