[pitivi] layer: Cleanup layer releasing process
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] layer: Cleanup layer releasing process
- Date: Thu, 11 Jun 2015 09:21:20 +0000 (UTC)
commit 5dbde02e81ffd55524726bf3fb81351cecf45aac
Author: Thibault Saunier <tsaunier gnome org>
Date: Mon Jun 1 17:48:25 2015 +0200
layer: Cleanup layer releasing process
Avoiding to try to remove a Clip from the PitiviLayerLayout twice.
pitivi/timeline/layer.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/timeline/layer.py b/pitivi/timeline/layer.py
index deab26e..3d1a0d8 100644
--- a/pitivi/timeline/layer.py
+++ b/pitivi/timeline/layer.py
@@ -416,6 +416,7 @@ class Layer(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
self.props.valign = Gtk.Align.START
self._layout = LayerLayout(self.timeline)
+ self._layout.connect("remove", self.__childWidgetRemovedCb)
self.add(self._layout)
self.media_types = GES.TrackType(0)
@@ -504,12 +505,18 @@ class Layer(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
self._removeClip(bClip)
def _removeClip(self, bClip):
+ if not bClip.ui:
+ return
+
ui_type = elements.GES_TYPE_UI_TYPE.get(bClip.__gtype__, None)
if ui_type is None:
self.error("Implement UI for type %s?" % bClip.__gtype__)
return
self._layout.remove(bClip.ui)
+
+ def __childWidgetRemovedCb(self, layout, clip):
+ bClip = clip.bClip
bClip.ui.layer = None
if self.timeline.draggingElement is None:
bClip.ui = None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]