[gcompris/gcomprixogoo] now the limit works in reverse also.



commit 47e7af5c5a3ec3f438e969585824faa8984bd708
Author: Bruno Coudoin <bruno coudoin free fr>
Date:   Sun Nov 1 00:32:59 2009 +0100

    now the limit works in reverse also.

 src/anim-activity/Timeline.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/anim-activity/Timeline.py b/src/anim-activity/Timeline.py
index 7ab1d37..88c58b7 100644
--- a/src/anim-activity/Timeline.py
+++ b/src/anim-activity/Timeline.py
@@ -121,7 +121,9 @@ class Timeline:
     def previous(self):
         self.current_time -= 1
         if self.current_time < 0:
-            self.current_time = len(self.timelinelist) - 1
+            self.current_time = min(len(self.timelinelist) - 1,
+                                    self.last_mark)
+
         self.select_it(self.timelinelist[self.current_time])
 
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]