Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f6b8891

Browse filesBrowse files
authored
Merge pull request #17133 from QuLogic/fix-button-widget
Fix Button widget motion callback.
2 parents 717d1fa + 01afbda commit f6b8891
Copy full SHA for f6b8891

File tree

Expand file treeCollapse file tree

1 file changed

+2
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-6
lines changed

‎lib/matplotlib/widgets.py

Copy file name to clipboardExpand all lines: lib/matplotlib/widgets.py
+2-6Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -210,13 +210,9 @@ def _release(self, event):
210210
def _motion(self, event):
211211
if self.ignore(event):
212212
return
213-
if event.inaxes == self.ax:
214-
c = self.hovercolor
215-
else:
216-
c = self.color
217-
if c != self._lastcolor:
213+
c = self.hovercolor if event.inaxes == self.ax else self.color
214+
if c != self.ax.get_facecolor():
218215
self.ax.set_facecolor(c)
219-
self._lastcolor = c
220216
if self.drawon:
221217
self.ax.figure.canvas.draw()
222218

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.