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

Skip to content

Commit b88acdb

Browse files
tacaswellksunden
authored andcommitted
FIX: handle the change detection differently for multicursor
There is not a singular canvas
1 parent 1ff61cf commit b88acdb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/widgets.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,6 +2110,12 @@ def clear(self, event):
21102110
return
21112111
if self.useblit:
21122112
for canvas, info in self._canvas_infos.items():
2113+
# someone has switched the canvas on us! This happens if
2114+
# `savefig` needs to save to a format the previous backend did
2115+
# not support (e.g. saving a figure using an Agg based backend
2116+
# saved to a vector format).
2117+
if canvas is not canvas.figure.canvas:
2118+
continue
21132119
info["background"] = canvas.copy_from_bbox(canvas.figure.bbox)
21142120

21152121
def onmove(self, event):

0 commit comments

Comments
 (0)