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 d1be9ad

Browse filesBrowse files
authored
Merge pull request matplotlib#17298 from anntzer/tkzoom
Fix rubberband in tk.
2 parents 78ecc33 + b9b9f37 commit d1be9ad
Copy full SHA for d1be9ad

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+3
-2
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3086,7 +3086,7 @@ def release_zoom(self, event):
30863086

30873087
self.push_current()
30883088
release = cbook._deprecate_method_override(
3089-
__class__.press, self, since="3.3", message="Calling an "
3089+
__class__.release, self, since="3.3", message="Calling an "
30903090
"overridden release() at zoom stop is deprecated since %(since)s "
30913091
"and will be removed %(removal)s; override release_zoom() "
30923092
"instead.")

‎lib/matplotlib/backends/_backend_tk.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/_backend_tk.py
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -533,7 +533,8 @@ def draw_rubberband(self, event, x0, y0, x1, y1):
533533
self.canvas._tkcanvas.delete(self.lastrect)
534534
self.lastrect = self.canvas._tkcanvas.create_rectangle(x0, y0, x1, y1)
535535

536-
def release(self, event):
536+
def release_zoom(self, event):
537+
super().release_zoom(event)
537538
if hasattr(self, "lastrect"):
538539
self.canvas._tkcanvas.delete(self.lastrect)
539540
del self.lastrect

0 commit comments

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