[hamster-applet] solved little rubbish of uninitialized data



commit 51a7de6bcb3f4f30a187953679a674e1cac3bcf6
Author: Toms Bauģis <toms baugis gmail com>
Date:   Tue Jun 16 00:40:09 2009 +0100

    solved little rubbish of uninitialized data

 hamster/graphics.py |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/hamster/graphics.py b/hamster/graphics.py
index 0213aeb..78ebc86 100644
--- a/hamster/graphics.py
+++ b/hamster/graphics.py
@@ -48,6 +48,7 @@ class Area(gtk.DrawingArea):
         # use these to mark area where the "real" drawing is going on
         self.graph_x, self.graph_y = 0, 0
         self.graph_width, self.graph_height = None, None 
+        self.x_factor, self.y_factor = None, None
 
     def redraw_canvas(self):
         """Force graph redraw"""
@@ -76,7 +77,7 @@ class Area(gtk.DrawingArea):
                 self.value_boundaries[2] = y_min
             if y_max != None:
                 self.value_boundaries[3] = y_max 
-        self.x_factor, self.y_factor = None, None #set those to none to be recalculated on next call
+        self._get_factors()
 
     def _get_factors(self):
         if not self.x_factor:



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