Explicitly return None for negative event indices. Prior to this,
eventat(-1) would return the next-to-last event causing the back button to cycle back to the end of an event source instead of stopping at the start.
This commit is contained in:
parent
a6aedc5d49
commit
c3db6aa680
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=272315
@ -856,7 +856,7 @@ def ysize(self):
|
||||
return (Y_EVENTSOURCE)
|
||||
|
||||
def eventat(self, i):
|
||||
if (i >= len(self.events)):
|
||||
if (i >= len(self.events) or i < 0):
|
||||
return (None)
|
||||
event = self.events[i]
|
||||
return (event)
|
||||
|
Loading…
Reference in New Issue
Block a user