[pitivi] marker-list: change marker_moved_cb
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] marker-list: change marker_moved_cb
- Date: Thu, 17 Oct 2019 17:40:59 +0000 (UTC)
commit fbd61818ed573a6caeaa641ccb28f382075da9b9
Author: Henry Wilkes <hwilkes igalia com>
Date: Thu Oct 17 16:54:47 2019 +0100
marker-list: change marker_moved_cb
Changed the marker_moved_cb to include the addition previous position
argument, in response to a change in GESMarkerList::marker-moved
https://gitlab.freedesktop.org/gstreamer/gst-editing-services/merge_requests/120
pitivi/timeline/markers.py | 3 ++-
pitivi/undo/markers.py | 7 +------
2 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/pitivi/timeline/markers.py b/pitivi/timeline/markers.py
index 0d22003b..2a1b282e 100644
--- a/pitivi/timeline/markers.py
+++ b/pitivi/timeline/markers.py
@@ -232,7 +232,8 @@ class MarkersBox(Gtk.EventBox, Zoomable, Loggable):
self.layout.remove(ges_marker.ui)
ges_marker.ui = None
- def _marker_moved_cb(self, unused_markers, position, ges_marker):
+ def _marker_moved_cb(
+ self, unused_markers, unused_prev_position, position, ges_marker):
self._move_marker(position, ges_marker)
def _move_marker(self, position, ges_marker):
diff --git a/pitivi/undo/markers.py b/pitivi/undo/markers.py
index 0ec7b55b..d4c720a8 100644
--- a/pitivi/undo/markers.py
+++ b/pitivi/undo/markers.py
@@ -39,7 +39,6 @@ class MarkerListObserver(Loggable):
self.action_log = action_log
- self.markers_position = {}
self.marker_observers = {}
ges_marker_list.connect("marker-added", self._marker_added_cb)
@@ -53,7 +52,6 @@ class MarkerListObserver(Loggable):
def _connect(self, ges_marker):
marker_observer = MetaContainerObserver(ges_marker, self.action_log)
self.marker_observers[ges_marker] = marker_observer
- self.markers_position[ges_marker] = ges_marker.props.position
def _marker_added_cb(self, ges_marker_list, position, ges_marker):
action = MarkerAdded(ges_marker_list, ges_marker)
@@ -65,13 +63,10 @@ class MarkerListObserver(Loggable):
self.action_log.push(action)
marker_observer = self.marker_observers.pop(ges_marker)
marker_observer.release()
- del self.markers_position[ges_marker]
- def _marker_moved_cb(self, ges_marker_list, position, ges_marker):
- old_position = self.markers_position[ges_marker]
+ def _marker_moved_cb(self, ges_marker_list, old_position, position, ges_marker):
action = MarkerMoved(ges_marker_list, ges_marker, old_position)
self.action_log.push(action)
- self.markers_position[ges_marker] = ges_marker.props.position
# pylint: disable=abstract-method, too-many-ancestors
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]