[pitivi] Fix missed use of _snapEndedCb
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] Fix missed use of _snapEndedCb
- Date: Sat, 21 Jul 2012 20:00:47 +0000 (UTC)
commit 77dfdfc7ea9e5be1766192575899b23adde20cc0
Author: Paul Lange <palango gmx de>
Date: Fri Jul 6 16:19:06 2012 +0200
Fix missed use of _snapEndedCb
pitivi/timeline/timeline.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index dd75c11..926b6d6 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -390,7 +390,7 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
Display or hide a snapping indicator line
"""
if position == 0:
- self._snapEndedCb()
+ self._buttonReleasedCb(None, None)
else:
self.debug("Snapping indicator at %d" % position)
self._snap_indicator.props.x = Zoomable.nsToPixel(position)
@@ -399,8 +399,9 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
def _buttonReleasedCb(self, canvas, event):
# select clicked layer, if any
- x, y = self.from_event(event) + self._get_adjustment(True, True)
- self.app.gui.timeline_ui.controls.selectLayerControlForY(y)
+ if event and canvas:
+ x, y = self.from_event(event) + self._get_adjustment(True, True)
+ self.app.gui.timeline_ui.controls.selectLayerControlForY(y)
# also hide snap indicator
self._snap_indicator.props.visibility = goocanvas.ITEM_INVISIBLE
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]