[pitivi] widgets: Check that effect has a parent to hide related effects keyframe
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] widgets: Check that effect has a parent to hide related effects keyframe
- Date: Sat, 15 Nov 2014 16:27:34 +0000 (UTC)
commit 94a35e987a22c8458efbf1758938710aaa48232d
Author: Thibault Saunier <tsaunier gnome org>
Date: Sat Nov 15 17:23:10 2014 +0100
widgets: Check that effect has a parent to hide related effects keyframe
Avoiding backtrace when undo an effect adition while editing that
effect properties
pitivi/utils/widgets.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/utils/widgets.py b/pitivi/utils/widgets.py
index a931668..157e38c 100644
--- a/pitivi/utils/widgets.py
+++ b/pitivi/utils/widgets.py
@@ -610,7 +610,12 @@ class GstElementSettingsWidget(Gtk.VBox, Loggable):
self._setKeyframeToggleButtonState(togglebutton, False)
effect = self.element
- for track_element in effect.get_parent().get_children(False):
+ parent = effect.get_parent()
+ if not parent:
+ self.log("Effect has no parent (it has been removed?)")
+ return
+
+ for track_element in parent.get_children(False):
if hasattr(track_element, "ui_element"):
track_element.ui_element.hideKeyframes()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]