8000 Merge pull request #6808 from anntzer/dont-forget-to-disconnect-dragg… · matplotlib/matplotlib@3cb79ed · GitHub
[go: up one dir, main page]

Skip to content

Commit 3cb79ed

Browse files
authored
Merge pull request #6808 from anntzer/dont-forget-to-disconnect-dragging-callbacks
FIX: Don't forget to disconnect callbacks for dragging.
2 parents 96003f9 + c6d9f97 commit 3cb79ed

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/offsetbox.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1695,6 +1695,12 @@ def disconnect(self):
16951695
"""disconnect the callbacks"""
16961696
for cid in self.cids:
16971697
self.canvas.mpl_disconnect(cid)
1698+
try:
1699+
c1 = self._c1
1700+
except AttributeError:
1701+
pass
1702+
else:
1703+
self.canvas.mpl_disconnect(c1)
16981704

16991705
def artist_picker(self, artist, evt):
17001706
return self.ref_artist.contains(evt)

0 commit comments

Comments
 (0)
0