Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: 3 fixes for widgets (MultiCrusor, SpanSelector, Slider) #3313

Merged
merged 1 commit into from Oct 4, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions lib/matplotlib/widgets.py
Expand Up @@ -425,7 +425,7 @@ def set_val(self, val):
self.poly.xy = xy
self.valtext.set_text(self.valfmt % val)
if self.drawon:
self.ax.figure.canvas.draw()
self.ax.figure.canvas.draw_idle()
self.val = val
if not self.eventson:
return
Expand Down Expand Up @@ -1011,7 +1011,7 @@ def __init__(self, canvas, axes, useblit=True, horizOn=False, vertOn=True,
self.background = None
self.needclear = False

if useblit:
if self.useblit:
lineprops['animated'] = True

if vertOn:
Expand Down Expand Up @@ -1198,6 +1198,9 @@ def update_background(self, event):

def ignore(self, event):
"""return *True* if *event* should be ignored"""
# If canvas was locked
if not self.canvas.widgetlock.available(self):
return True
widget_off = not self.visible or not self.active
non_event = event.inaxes != self.ax or event.button != 1
return widget_off or non_event
Expand Down