Skip to content
This repository has been archived by the owner on Mar 22, 2018. It is now read-only.

Commit

Permalink
added function to disconnect all signals from a widget in a view.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrasca committed Dec 29, 2015
1 parent 2ed26c6 commit 941af80
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bauble/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,18 @@ def disconnect_all(self):
obj.disconnect(sid)
del self.__attached_signals[:]

def disconnect_widget_signals(self, widget):
"""disconnect all signals attached to widget"""

removed = []
for obj, sid in self.__attached_signals:
if obj == widget:
widget.disconnect(sid)
removed.append((obj, sid))

for item in removed:
self.__attached_signals.remove(item)

def get_window(self):
"""
Return the top level window for view
Expand Down

0 comments on commit 941af80

Please sign in to comment.