[pitivi/gtktimeline] timeline: Update elements position in the size_allocate GtkWidget vmethod



commit abab37c709d69cf4c9c817e88b8e86c6d778676b
Author: Thibault Saunier <tsaunier gnome org>
Date:   Mon Jun 8 10:06:30 2015 +0200

    timeline: Update elements position in the size_allocate GtkWidget vmethod
    
    Instead of in the draw method where it does not belong.

 pitivi/timeline/elements.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index 35cd6a2..e1fccce 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -639,8 +639,11 @@ class Clip(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
 
         self.timeline.sendFakeEvent(event, event_widget)
 
-    def do_draw(self, cr):
+    def do_size_allocate(self, request):
         self.updatePosition()
+        Gtk.EventBox.do_size_allocate(self, request)
+
+    def do_draw(self, cr):
         Gtk.EventBox.do_draw(self, cr)
 
     def _clickedCb(self, unused_action, unused_actor):


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