[pitivi] widgets: Don't reset non keyframe-able properties keyframe properties on reset
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] widgets: Don't reset non keyframe-able properties keyframe properties on reset
- Date: Wed, 30 Mar 2016 16:36:27 +0000 (UTC)
commit 0a2d9f643293915052de0aa82e9b9dd23610c36a
Author: Thibault Saunier <tsaunier gnome org>
Date: Fri Mar 25 10:17:55 2016 +0100
widgets: Don't reset non keyframe-able properties keyframe properties on reset
Fixes T7355
Reviewed-by: Alex Băluț <alexandru balut gmail com>
Differential Revision: https://phabricator.freedesktop.org/D838
pitivi/utils/widgets.py | 22 +++++++++++++---------
1 files changed, 13 insertions(+), 9 deletions(-)
---
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index 34207bf..70b11a7 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -811,17 +811,21 @@ class GstElementSettingsWidget(Gtk.Box, Loggable):
def __reset_to_default_clicked_cb(self, unused_button, widget,
keyframe_button):
- binding = self.__bindings_by_keyframe_button.get(keyframe_button)
- if binding:
+ if keyframe_button:
# The prop is controllable (keyframmable).
- binding.props.control_source.unset_all()
- if keyframe_button.get_active():
- track_element = self.__get_track_element_of_same_type(self.element)
- if track_element:
- track_element.ui_element.showDefaultKeyframes()
- self.__display_controlled(keyframe_button, False)
+ binding = self.__bindings_by_keyframe_button.get(keyframe_button)
+ if binding:
+ # The prop has been keyframed
+ binding.props.control_source.unset_all()
+ if keyframe_button.get_active():
+ track_element = self.__get_track_element_of_same_type(
+ self.element)
+ if track_element:
+ track_element.ui_element.showDefaultKeyframes()
+ self.__set_keyframe_active(keyframe_button, False)
+ self.__display_controlled(keyframe_button, False)
+
widget.setWidgetToDefault()
- self.__set_keyframe_active(keyframe_button, False)
def __get_track_element_of_same_type(self, effect):
track_type = effect.get_track_type()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]