aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Components/Converter/StringList.py7
-rw-r--r--lib/python/Components/Sources/List.py5
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/python/Components/Converter/StringList.py b/lib/python/Components/Converter/StringList.py
index acbba344..213f08bc 100644
--- a/lib/python/Components/Converter/StringList.py
+++ b/lib/python/Components/Converter/StringList.py
@@ -18,11 +18,18 @@ class StringList(Converter):
def selectionChanged(self, index):
self.source.selectionChanged(index)
+
+ def setIndex(self, index):
# update all non-master targets
for x in self.downstream_elements:
if x is not self.master:
x.index = index
+ def getIndex(self, index):
+ return None
+
+ index = property(getIndex, setIndex)
+
@cached
def getCurrent(self):
if self.source is None or self.index is None or self.index >= len(self.source.list):
diff --git a/lib/python/Components/Sources/List.py b/lib/python/Components/Sources/List.py
index 23b53957..dbe442d1 100644
--- a/lib/python/Components/Sources/List.py
+++ b/lib/python/Components/Sources/List.py
@@ -40,6 +40,11 @@ to generate HTML."""
if self.disable_callbacks:
return
+ # update all non-master targets
+ for x in self.downstream_elements:
+ if x is not self.master:
+ x.index = index
+
for x in self.onSelectionChanged:
x()