[pitivi] ui/timelinecanvas.py: fixed the precision of timeline selection by correcting the extra space betwee
- From: Edward Hervey <edwardrv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] ui/timelinecanvas.py: fixed the precision of timeline selection by correcting the extra space betwee
- Date: Thu, 9 Sep 2010 15:01:19 +0000 (UTC)
commit f7840482402a61e0ea913aa677d5aa8c1f778774
Author: Luis de Bethencourt <luis debethencourt com>
Date: Wed Sep 8 17:12:01 2010 +0200
ui/timelinecanvas.py: fixed the precision of timeline selection by correcting the extra space between the visual clip and the canvas clip.
pitivi/ui/curve.py | 4 ++--
pitivi/ui/timelinecanvas.py | 10 +++-------
2 files changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/pitivi/ui/curve.py b/pitivi/ui/curve.py
index 6e2d41c..581be8c 100644
--- a/pitivi/ui/curve.py
+++ b/pitivi/ui/curve.py
@@ -200,7 +200,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
if self.element.factory:
self.visible_width = self.nsToPixel(self.element.duration)
self.bounds = goocanvas.Bounds(0, 0,
- self.visible_width + KW_LABEL_X_OVERFLOW,
+ self.visible_width + KW_LABEL_X_OVERFLOW,
self.height + KW_LABEL_Y_OVERFLOW)
def _getKeyframeXY(self, kf):
@@ -224,7 +224,7 @@ class Curve(goocanvas.ItemSimple, goocanvas.Item, View, Zoomable):
# set clipping region to the visible portion of the clip
vis_bounds = intersect(
goocanvas.Bounds(
- self.bounds.x1, self.bounds.y1 + KW_LABEL_Y_OVERFLOW,
+ self.bounds.x1, self.bounds.y1 + KW_LABEL_Y_OVERFLOW,
self.bounds.x2 - KW_LABEL_X_OVERFLOW, self.bounds.y2), bounds)
vis_width = vis_bounds.x2 - vis_bounds.x1
vis_height = vis_bounds.y2 - vis_bounds.y1
diff --git a/pitivi/ui/timelinecanvas.py b/pitivi/ui/timelinecanvas.py
index 9316807..0e805a4 100644
--- a/pitivi/ui/timelinecanvas.py
+++ b/pitivi/ui/timelinecanvas.py
@@ -212,15 +212,13 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
y -= h
return (x, y), (w, h)
-
def _selectionDrag(self, item, target, event):
if self._selecting:
self._got_motion_notify = True
cur = self.from_event(event)
pos, size = self._normalize(self._mousedown, cur)
- m = self._marquee
- m.props.x, m.props.y = pos
- m.props.width, m.props.height = size
+ self._marquee.props.x, self._marquee.props.y = pos
+ self._marquee.props.width, self._marquee.props.height = size
return True
return False
@@ -228,8 +226,6 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
self._selecting = True
self._marquee.props.visibility = goocanvas.ITEM_VISIBLE
self._mousedown = self.from_event(event)
- self._marquee.props.width = 0
- self._marquee.props.height = 0
self.pointer_grab(self.get_root_item(), gtk.gdk.POINTER_MOTION_MASK |
gtk.gdk.BUTTON_RELEASE_MASK, self._cursor, event.time)
return True
@@ -257,7 +253,7 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
True)
if items:
return set((item.element for item in items if isinstance(item,
- TrackObject)))
+ TrackObject) and item.bg in items))
return set()
## playhead implementation
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]