[pitivi: 9/11] timelinecanvas: make marquee work again with the new scrolling method
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi: 9/11] timelinecanvas: make marquee work again with the new scrolling method
- Date: Tue, 12 Oct 2010 08:13:31 +0000 (UTC)
commit 26c10ebfea797cacf6754edf98dc3cdcfed46501
Author: Alessandro Decina <alessandro d gmail com>
Date: Mon Oct 4 14:28:33 2010 +0200
timelinecanvas: make marquee work again with the new scrolling method
pitivi/ui/timelinecanvas.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/timelinecanvas.py b/pitivi/ui/timelinecanvas.py
index 5f8a1ab..64917f2 100644
--- a/pitivi/ui/timelinecanvas.py
+++ b/pitivi/ui/timelinecanvas.py
@@ -125,7 +125,9 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
self.set_size_request(-1, height)
def from_event(self, event):
- return Point(*self.convert_from_pixels(event.x, event.y))
+ x, y = event.x, event.y
+ x += self.app.gui.timeline.hadj.get_value()
+ return Point(*self.convert_from_pixels(x, y))
def setExpanded(self, track_object, expanded):
track_ui = None
@@ -250,7 +252,9 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
self._got_motion_notify = True
cur = self.from_event(event)
pos, size = self._normalize(self._mousedown, cur)
- self._marquee.props.x, self._marquee.props.y = pos
+ x, y = pos
+ x += self.app.gui.timeline.hadj.get_value()
+ self._marquee.props.x, self._marquee.props.y = (x, y)
self._marquee.props.width, self._marquee.props.height = size
return True
return False
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]