[pitivi] timeline: Set the snapping distance when a project is loaded
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] timeline: Set the snapping distance when a project is loaded
- Date: Sat, 13 Dec 2014 19:11:16 +0000 (UTC)
commit c5b1b07267d33e3bdaeb6a36741ded1feb2fed68
Author: Thibault Saunier <tsaunier gnome org>
Date: Sun Nov 30 20:01:15 2014 +0100
timeline: Set the snapping distance when a project is loaded
Otherwise we could end up with no snapping distance set, and thus no
snapping happening in the timeline.
It is normally done in the zoom level changed callback but it was
possible that this codepath was not triggered if the zoom level did not
need to change
pitivi/timeline/timeline.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/timeline.py b/pitivi/timeline/timeline.py
index cf71a7f..f393a11 100644
--- a/pitivi/timeline/timeline.py
+++ b/pitivi/timeline/timeline.py
@@ -1102,6 +1102,7 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
# to the timeline, zooming in would be confusing.
self.log(
"Zoom not changed because the entire timeline is already visible")
+
return
Zoomable.setZoomLevel(nearest_zoom_level)
@@ -1405,6 +1406,9 @@ class TimelineContainer(Gtk.Grid, Zoomable, Loggable):
self._renderingSettingsChangedCb(self._project, None, None)
self._setBestZoomRatio()
+ if self.bTimeline:
+ self.bTimeline.set_snapping_distance(
+ Zoomable.pixelToNs(self._settings.edgeSnapDeadband))
def _projectCreatedCb(self, unused_app, project):
"""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]