[pitivi] timeline/elements, utils/widgets: reset keyframes curve properly.
- From: Jean-François Fortin Tam <jfft src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] timeline/elements, utils/widgets: reset keyframes curve properly.
- Date: Mon, 8 Jul 2013 00:52:27 +0000 (UTC)
commit 5fef7a6fafa526f708dcc383f0e33817ee2b7ea5
Author: Mathieu Duponchelle <mathieu duponchelle epitech eu>
Date: Fri Jul 5 01:32:48 2013 +0200
timeline/elements, utils/widgets: reset keyframes curve properly.
pitivi/timeline/elements.py | 13 +++++++++----
pitivi/utils/widgets.py | 1 +
2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/timeline/elements.py b/pitivi/timeline/elements.py
index d9eec67..ef7e444 100644
--- a/pitivi/timeline/elements.py
+++ b/pitivi/timeline/elements.py
@@ -425,14 +425,19 @@ class TimelineElement(Clutter.Actor, Zoomable):
if not (element.set_control_source(source, propname.name, "direct")):
print "There was something like a problem captain"
return
- val = float(propname.default_value) / (propname.maximum - propname.minimum)
- source.set(self.bElement.props.in_point, val)
- source.set(self.bElement.props.duration, val)
binding = element.get_control_binding(propname.name)
+
self.binding = binding
- self.source = self.binding.props.control_source
self.prop = propname
self.keyframedElement = element
+ self.source = self.binding.props.control_source
+
+ if len(self.source.get_all()) < 2:
+ self.source.unset_all()
+ val = float(propname.default_value) / (propname.maximum - propname.minimum)
+ self.source.set(self.bElement.props.in_point, val)
+ self.source.set(self.bElement.props.duration, val)
+
self.updateKeyframes()
def hideKeyframes(self):
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index b1a73a8..183a327 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -977,6 +977,7 @@ class GstElementSettingsWidget(Gtk.VBox, Loggable):
if hasattr(track_element, "ui_element") and track_type == track_element.get_track_type():
binding.props.control_source.unset_all()
track_element.ui_element.updateKeyframes()
+ self.resetShowKeyframesButton()
widget.set_sensitive(True)
widget.setWidgetToDefault()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]