[pitivi] clipproperties: Disconnect from the timeline if one has been set already
- From: Thibault Saunier <tsaunier src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] clipproperties: Disconnect from the timeline if one has been set already
- Date: Wed, 24 Sep 2014 17:07:47 +0000 (UTC)
commit 2564a7567156bff79a4b65a9c7411e53ae46caea
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Wed Jul 30 00:41:57 2014 +0200
clipproperties: Disconnect from the timeline if one has been set already
pitivi/clipproperties.py | 12 ++++--------
1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/pitivi/clipproperties.py b/pitivi/clipproperties.py
index 15340ce..8d81036 100644
--- a/pitivi/clipproperties.py
+++ b/pitivi/clipproperties.py
@@ -259,16 +259,12 @@ class EffectProperties(Gtk.Expander, Loggable):
return self._timeline
def _setTimeline(self, timeline):
+ if self.connected:
+ self._timeline.selection.disconnect_by_func(self._selectionChangedCb)
+ self._timeline = timeline
if timeline:
- self._timeline = timeline
self._timeline.selection.connect("selection-changed", self._selectionChangedCb)
- self.connected = True
- else:
- if self.connected:
- self._timeline.selection.disconnect_by_func(self._selectionChangedCb)
-
- self.connected = False
- self._timeline = None
+ self.connected = bool(timeline)
timeline = property(_getTimeline, _setTimeline)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]