Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ui/timelinecanvas.py: fixed the precision of timeline selection by co…

…rrecting the extra space between the visual clip and the canvas clip.
  • Loading branch information...
commit f7840482402a61e0ea913aa677d5aa8c1f778774 1 parent 280d4b8
@luisbg luisbg authored alessandrod committed
Showing with 5 additions and 9 deletions.
  1. +2 −2 pitivi/ui/curve.py
  2. +3 −7 pitivi/ui/timelinecanvas.py
View
4 pitivi/ui/curve.py
@@ -200,7 +200,7 @@ def do_simple_update(self, cr):
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 @@ def do_simple_paint(self, cr, bounds):
# 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
View
10 pitivi/ui/timelinecanvas.py
@@ -212,15 +212,13 @@ def _normalize(self, p1, p2):
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 @@ def _selectionStart(self, item, target, event):
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 @@ def _objectsUnderMarquee(self):
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
Please sign in to comment.
Something went wrong with that request. Please try again.