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 be0e033

Browse filesBrowse files
authored
Merge pull request #14248 from timhoffm/fix-textbox-respect-eventson
Fix TextBox not respecting eventson
2 parents 40791c9 + 5bda940 commit be0e033
Copy full SHA for be0e033

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+6
-4
lines changed

‎lib/matplotlib/widgets.py

Copy file name to clipboardExpand all lines: lib/matplotlib/widgets.py
+6-4Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -790,8 +790,9 @@ def _rendercursor(self):
790790
self.ax.figure.canvas.draw()
791791

792792
def _notify_submit_observers(self):
793-
for cid, func in self.submit_observers.items():
794-
func(self.text)
793+
if self.eventson:
794+
for cid, func in self.submit_observers.items():
795+
func(self.text)
795796

796797
def _release(self, event):
797798
if self.ignore(event):
@@ -849,8 +850,9 @@ def set_val(self, val):
849850
self._notify_submit_observers()
850851

851852
def _notify_change_observers(self):
852-
for cid, func in self.change_observers.items():
853-
func(self.text)
853+
if self.eventson:
854+
for cid, func in self.change_observers.items():
855+
func(self.text)
854856

855857
def begin_typing(self, x):
856858
self.capturekeystrokes = True

0 commit comments

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