Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 78fa072

Browse files
committed
Merge pull request #1630 from mdboom/reconnect_callbacks
A disconnected callback cannot be reconnected
2 parents 894742b + 9192d57 commit 78fa072

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/matplotlib/cbook.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,10 @@ def disconnect(self, cid):
323323
except KeyError:
324324
continue
325325
else:
326-
for key, value in self._func_cid_map.items():
327-
if value == cid:
328-
del self._func_cid_map[key]
326+
for category, functions in self._func_cid_map.items():
327+
for function, value in functions.items():
328+
if value == cid:
329+
del functions[function]
329330
return
330331

331332
def process(self, s, *args, **kwargs):

0 commit comments

Comments
 (0)