[pitivi] clipproperties: Replace manual timeline commit



commit a00e5fe27623b9d4110de10a1c7fcc654fec8fbd
Author: Alexandru Băluț <alexandru balut gmail com>
Date:   Wed Dec 7 17:00:19 2016 +0100

    clipproperties: Replace manual timeline commit
    
    Reviewed-by: Thibault Saunier <tsaunier gnome org>
    Differential Revision: https://phabricator.freedesktop.org/D1538

 pitivi/clipproperties.py |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index ebd394c..74aa5ab 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -447,12 +447,15 @@ class EffectProperties(Gtk.Expander, Loggable):
 
     def _effectActiveToggleCb(self, cellrenderertoggle, path):
         _iter = self.storemodel.get_iter(path)
-        tck_effect = self.storemodel.get_value(_iter, COL_TRACK_EFFECT)
-        with self.app.action_log.started("change active state"):
-            tck_effect.props.active = not tck_effect.props.active
-            cellrenderertoggle.set_active(tck_effect.is_active())
-            self._updateTreeview()
-            self._project.ges_timeline.commit()
+        effect = self.storemodel.get_value(_iter, COL_TRACK_EFFECT)
+        pipeline = self._project.ges_timeline.get_parent()
+        with self.app.action_log.started("change active state",
+                                         CommitTimelineFinalizingAction(pipeline)):
+            effect.props.active = not effect.props.active
+        # This is not strictly necessary, but makes sure
+        # the UI reflects the current status.
+        cellrenderertoggle.set_active(effect.is_active())
+        self._updateTreeview()
 
     def _expandedCb(self, unused_expander, unused_params):
         self.__updateAll()


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]