[billreminder: 14/17] Center the selected day when resize the timeline.



commit 4ad672e625174876a687e7fb0a9d77087c210a21
Author: Luiz Armesto <luiz armesto gmail com>
Date:   Wed Feb 23 21:11:32 2011 -0300

    Center the selected day when resize the timeline.

 src/gui/widgets/timeline.py |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/widgets/timeline.py b/src/gui/widgets/timeline.py
index e01c04e..2f11eb2 100644
--- a/src/gui/widgets/timeline.py
+++ b/src/gui/widgets/timeline.py
@@ -641,9 +641,6 @@ class Timeline(gtk.DrawingArea):
         if self.auto_select_display_days:
             self.display_days = self.width / 32
             self._value_changed()
-            self.queue_draw_area(
-                0, 0, self.allocation.width, self.allocation.height
-            )
         
         # Set timeline subdivisions size
         self._div_width = float(allocation.width - self._box_rect.x * 2) / \
@@ -661,6 +658,8 @@ class Timeline(gtk.DrawingArea):
         else:
             self._bullet_radius = (self._div_width - self._div_width / 4) / 2
 
+        self._center_selection()
+            
         return False
 
     def _dist_dates(self, first=None):



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