[pitivi] ruler: Make sure we are using the same values we are reporting in the log message



commit b48f6bbb52c3154994ca3a882d6f23f54b6541c6
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Mon Dec 30 20:26:40 2013 +0100

    ruler: Make sure we are using the same values we are reporting in the log message

 pitivi/timeline/ruler.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/ruler.py b/pitivi/timeline/ruler.py
index 0a346fd..289a2ee 100644
--- a/pitivi/timeline/ruler.py
+++ b/pitivi/timeline/ruler.py
@@ -141,8 +141,9 @@ class ScaleRuler(Gtk.DrawingArea, Zoomable, Loggable):
 
 ## Gtk.Widget overrides
     def configureEventCb(self, widget, event, data=None):
-        self.debug("Configuring, height %d, width %d",
-            widget.get_allocated_width(), widget.get_allocated_height())
+        width = widget.get_allocated_width()
+        height = widget.get_allocated_height()
+        self.debug("Configuring, height %d, width %d", width, height)
 
         # Destroy previous buffer
         if self.pixbuf is not None:
@@ -150,8 +151,7 @@ class ScaleRuler(Gtk.DrawingArea, Zoomable, Loggable):
             self.pixbuf = None
 
         # Create a new buffer
-        self.pixbuf = cairo.ImageSurface(cairo.FORMAT_ARGB32,
-                widget.get_allocated_width(), widget.get_allocated_height())
+        self.pixbuf = cairo.ImageSurface(cairo.FORMAT_ARGB32, width, height)
 
         return False
 


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