Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6efb8c3

Browse filesBrowse files
committed
FIX: TextBox.disconnect remove from registries that TextBox has
closes #9436
1 parent 3aa2436 commit 6efb8c3
Copy full SHA for 6efb8c3

File tree

Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-4
lines changed

‎lib/matplotlib/widgets.py

Copy file name to clipboardExpand all lines: lib/matplotlib/widgets.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -928,10 +928,11 @@ def on_submit(self, func):
928928

929929
def disconnect(self, cid):
930930
"""remove the observer with connection id *cid*"""
931-
try:
932-
del self.observers[cid]
933-
except KeyError:
934-
pass
931+
for reg in (self.change_observers, self.submit_observers):
932+
try:
933+
del reg[cid]
934+
except KeyError:
935+
pass
935936

936937

937938
class RadioButtons(AxesWidget):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.