Skip to content

Commit

Permalink
Merge pull request #1982 from efiring/SpanSelector_blit_bug
Browse files Browse the repository at this point in the history
Fix bug in SpanSelector, introduced in commit dd32575
  • Loading branch information
pelson committed May 7, 2013
2 parents b009b63 + 2e31f66 commit 6131cf7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/matplotlib/widgets.py
Expand Up @@ -1072,10 +1072,12 @@ def __init__(self, ax, onselect, direction, minspan=None, useblit=False,
self.buttonDown = False
self.prev = (0, 0)

# Set useblit based on original canvas.
self.useblit = useblit and self.canvas.supports_blit

# Reset canvas so that `new_axes` connects events.
self.canvas = None
self.new_axes(ax)
self.useblit = useblit and self.canvas.supports_blit

def new_axes(self, ax):
self.ax = ax
Expand Down

0 comments on commit 6131cf7

Please sign in to comment.