From ea9231ad7229f47ebf117a3b4894a9e4e7a3c40a Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Mon, 19 Nov 2007 23:58:58 +0000 Subject: update scrollbar in timerlist when a entry is removed --- lib/python/Components/TimerList.py | 4 ++++ lib/python/Screens/TimerEdit.py | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'lib/python') diff --git a/lib/python/Components/TimerList.py b/lib/python/Components/TimerList.py index d3c20eca..b1d9ba02 100644 --- a/lib/python/Components/TimerList.py +++ b/lib/python/Components/TimerList.py @@ -98,3 +98,7 @@ class TimerList(HTMLComponent, GUIComponent, object): def invalidate(self): self.l.invalidate() + + def entryRemoved(self, idx): + self.l.entryRemoved(idx) + diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py index 8d8d9ac1..5a7109f2 100644 --- a/lib/python/Screens/TimerEdit.py +++ b/lib/python/Screens/TimerEdit.py @@ -148,8 +148,15 @@ class TimerEditList(Screen): self.refill() def refill(self): + oldsize = len(self.list) self.fillTimerList() - self["timerlist"].invalidate() + lst = self["timerlist"] + newsize = len(self.list) + if oldsize and oldsize != newsize: + idx = lst.getCurrentIndex() + lst.entryRemoved(idx) + else: + lst.invalidate() def addCurrentTimer(self): event = None -- cgit v1.2.3