Commit baf7dcde authored by Thibault Saunier's avatar Thibault Saunier Committed by Alexandru Băluț

clip: Disconnect from children on release

Differential Revision: https://phabricator.freedesktop.org/D589
parent 5be7a908
......@@ -821,6 +821,12 @@ class Clip(Gtk.EventBox, timelineUtils.Zoomable, Loggable):
for child in self.bClip.get_children(True):
self.__disconnectFromChild(child)
misc.disconnectAllByFunc(self.bClip, self._startChangedCb)
misc.disconnectAllByFunc(self.bClip, self._durationChangedCb)
misc.disconnectAllByFunc(self.bClip, self._layerChangedCb)
misc.disconnectAllByFunc(self.bClip, self._childAddedCb)
misc.disconnectAllByFunc(self.bClip, self._childRemovedCb)
def __showHandles(self):
for handle in self.handles:
handle.show()
......
......@@ -38,6 +38,19 @@ from pitivi.utils.threads import Thread
from pitivi.configure import APPMANUALURL_OFFLINE, APPMANUALURL_ONLINE, APPNAME
# Work around https://bugzilla.gnome.org/show_bug.cgi?id=759249
def disconnectAllByFunc(obj, func):
i = 0
while True:
i += 1
try:
obj.disconnect_by_func(func)
except TypeError:
return i
return i
def format_ns(timestamp):
if timestamp is None:
return None
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment