reset offset when choose time via menu button
[enigma2.git] / lib / python / Plugins / Extensions / GraphMultiEPG / GraphMultiEpg.py
index 33639dc..2499251 100644 (file)
@@ -40,7 +40,7 @@ class EPGList(HTMLComponent, GUIComponent):
                self.time_base = None
                self.time_epoch = time_epoch
                self.list = None
-               self.entry_rect = None
+               self.event_rect = None
 
        def isSelectable(self, service, sname, event_list):
                return (event_list and len(event_list) and True) or False
@@ -178,7 +178,7 @@ class EPGList(HTMLComponent, GUIComponent):
 
        def selEntry(self, dir, visible=True):
                cur_service = self.cur_service #(service, service_name, events)
-               if not self.entry_rect:
+               if not self.event_rect:
                        self.recalcEntrySize()
                if cur_service and self.cur_event is not None:
                        update = True
@@ -255,6 +255,9 @@ class EPGList(HTMLComponent, GUIComponent):
        def getTimeBase(self):
                return self.time_base + (self.offs * self.time_epoch * 60)
 
+       def resetOffset(self):
+               self.offs = 0
+
 class TimelineText(HTMLComponent, GUIComponent):
        def __init__(self):
                GUIComponent.__init__(self)
@@ -389,8 +392,10 @@ class GraphMultiEPG(Screen):
                if len(ret) > 1:
                        if ret[0]:
                                self.ask_time=ret[1]
-                               self["list"].fillMultiEPG(self.services, ret[1])
-                               self.moveTimeLines()
+                               l = self["list"]
+                               l.resetOffset()
+                               l.fillMultiEPG(self.services, ret[1])
+                               self.moveTimeLines(True)
 
        def closeScreen(self):
                self.close(self.closeRecursive)