[pitivi/ges] timeline: Don't set the snapping distance before the UI is ready
- From: Jean-FranÃois Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi/ges] timeline: Don't set the snapping distance before the UI is ready
- Date: Mon, 30 Apr 2012 16:09:20 +0000 (UTC)
commit d32928b18f9b325b9dcea502d271b7ba570da3cc
Author: Jean-FranÃois Fortin Tam <nekohayo gmail com>
Date: Mon Apr 30 12:09:00 2012 -0400
timeline: Don't set the snapping distance before the UI is ready
pitivi/timeline/timeline.py | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index d5c6d22..7e2ec6b 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1095,8 +1095,6 @@ class Timeline(gtk.Table, Loggable, Zoomable):
Zoomable.setZoomLevel(int(adjustment.get_value()))
self.log("Setting 'zoomed_fitted' to False")
self.app.gui.zoomed_fitted = False
- self._timeline.props.snapping_distance = \
- Zoomable.pixelToNs(self._settings.edgeSnapDeadband)
self._updateZoomSlider = True
def _zoomSliderScrollCb(self, unused_widget, event):
@@ -1110,6 +1108,11 @@ class Timeline(gtk.Table, Loggable, Zoomable):
if self._updateZoomSlider:
self._zoomAdjustment.set_value(self.getCurrentZoomLevel())
+ if self._settings and self._timeline:
+ # zoomChanged might be called various times before the UI is ready
+ self._timeline.props.snapping_distance = \
+ Zoomable.pixelToNs(self._settings.edgeSnapDeadband)
+
# the new scroll position should preserve the current horizontal
# position of the playhead in the window
cur_playhead_offset = self._canvas._playhead.props.x - self.hadj.props.value
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]