[pitivi] effects: Stop tracking values in the effect properties manager
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] effects: Stop tracking values in the effect properties manager
- Date: Tue, 5 Sep 2017 22:54:41 +0000 (UTC)
commit 00ab81d3e7bb5bea03a09b91ceb010e92c19d619
Author: Suhas Nayak <suhas2go gmail com>
Date: Sun Sep 3 02:08:03 2017 +0530
effects: Stop tracking values in the effect properties manager
The tracked values were used to figure out whether the properties
actually changed, but this is checked already by the undo/redo system,
in TimelineElementObserver._property_changed_cb.
Differential Revision: https://phabricator.freedesktop.org/D1862
pitivi/effects.py | 20 ++++++--------------
1 files changed, 6 insertions(+), 14 deletions(-)
---
diff --git a/pitivi/effects.py b/pitivi/effects.py
index 64e1f4e..3200fcf 100644
--- a/pitivi/effects.py
+++ b/pitivi/effects.py
@@ -605,7 +605,6 @@ class EffectsPropertiesManager(GObject.Object, Loggable):
GObject.Object.__init__(self)
Loggable.__init__(self)
self.cache_dict = {}
- self._current_element_values = {}
self.app = app
def getEffectConfigurationUI(self, effect):
@@ -628,10 +627,6 @@ class EffectsPropertiesManager(GObject.Object, Loggable):
self.cache_dict[effect] = effect_widget
self._connectAllWidgetCallbacks(effect_widget, effect)
- for prop in effect.list_children_properties():
- value = effect.get_child_property(prop.name)
- self._current_element_values[prop.name] = value
-
return self.cache_dict[effect]
def cleanCache(self, effect):
@@ -663,15 +658,12 @@ class EffectsPropertiesManager(GObject.Object, Loggable):
if isinstance(value, Gst.Fraction):
value = Gst.Fraction(int(value.num), int(value.denom))
- if value != self._current_element_values.get(prop.name):
- from pitivi.undo.timeline import CommitTimelineFinalizingAction
-
- pipeline = self.app.project_manager.current_project.pipeline
- with self.app.action_log.started("Effect property change",
- finalizing_action=CommitTimelineFinalizingAction(pipeline),
- toplevel=True):
- effect.set_child_property(prop.name, value)
- self._current_element_values[prop.name] = value
+ from pitivi.undo.timeline import CommitTimelineFinalizingAction
+ pipeline = self.app.project_manager.current_project.pipeline
+ with self.app.action_log.started("Effect property change",
+ finalizing_action=CommitTimelineFinalizingAction(pipeline),
+ toplevel=True):
+ effect.set_child_property(prop.name, value)
def create_property_widget(self, element_settings_widget, prop, prop_value):
prop_widget = self.emit("create_property_widget", element_settings_widget,
element_settings_widget.element,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]