8000 Merge pull request #1982 from efiring/SpanSelector_blit_bug · matplotlib/matplotlib@6131cf7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6131cf7

Browse files
committed
Merge pull request #1982 from efiring/SpanSelector_blit_bug
Fix bug in SpanSelector, introduced in commit dd32575
2 parents b009b63 + 2e31f66 commit 6131cf7

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/matplotlib/widgets.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1072,10 +1072,12 @@ def __init__(self, ax, onselect, direction, minspan=None, useblit=False,
10721072
self.buttonDown = False
10731073
self.prev = (0, 0)
10741074

1075+
# Set useblit based on original canvas.
1076+
self.useblit = useblit and self.canvas.supports_blit
1077+
10751078
# Reset canvas so that `new_axes` connects events.
10761079
self.canvas = None
10771080
self.new_axes(ax)
1078-
self.useblit = useblit and self.canvas.supports_blit
10791081

10801082
def new_axes(self, ax):
10811083
self.ax = ax

0 commit comments

Comments
 (0)
0