[pitivi: 8/12] timelinecanvas.py: update playhead on zoom
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pitivi: 8/12] timelinecanvas.py: update playhead on zoom
- Date: Tue, 1 Dec 2009 22:01:58 +0000 (UTC)
commit 3aa0d3197cd59d4317f9ecb38647c6672490373e
Author: Brandon Lewis <brandon_lewis alum berkeley edu>
Date: Mon Nov 30 14:48:53 2009 -0800
timelinecanvas.py: update playhead on zoom
pitivi/ui/timelinecanvas.py | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/ui/timelinecanvas.py b/pitivi/ui/timelinecanvas.py
index e92c476..fdd1426 100644
--- a/pitivi/ui/timelinecanvas.py
+++ b/pitivi/ui/timelinecanvas.py
@@ -54,7 +54,7 @@ PreferencesDialog.addNumericPreference('edgeSnapDeadband',
"operations"),
lower = 0)
-class PlayheadController(Controller):
+class PlayheadController(Controller, Zoomable):
_cursor = PLAYHEAD_CURSOR
@@ -265,7 +265,10 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
## playhead implementation
+ position = 0
+
def timelinePositionChanged(self, position):
+ self.position = position
self._playhead.props.x = self.nsToPixel(position)
max_duration = 0
@@ -286,6 +289,7 @@ class TimelineCanvas(goocanvas.Canvas, Zoomable, Loggable):
self.timeline.dead_band = self.pixelToNs(
self.settings.edgeSnapDeadband)
self._request_size()
+ self.timelinePositionChanged(self.position)
## settings callbacks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]