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 723d216

Browse filesBrowse files
authored
Merge pull request #17268 from meeseeksmachine/auto-backport-of-pr-17261-on-v3.2.x
Backport PR #17261 on branch v3.2.x (avoid calling wx.Bitmap() if width or height is zero)
2 parents 2f4a3e3 + 2046cde commit 723d216
Copy full SHA for 723d216

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+3
-3
lines changed

‎lib/matplotlib/backends/backend_wx.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_wx.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -776,14 +776,14 @@ def _onSize(self, evt):
776776
# no change in size
777777
return
778778
self._width, self._height = size
779-
# Create a new, correctly sized bitmap
780-
self.bitmap = wx.Bitmap(self._width, self._height)
781-
782779
self._isDrawn = False
783780

784781
if self._width <= 1 or self._height <= 1:
785782
return # Empty figure
786783

784+
# Create a new, correctly sized bitmap
785+
self.bitmap = wx.Bitmap(self._width, self._height)
786+
787787
dpival = self.figure.dpi
788788
winch = self._width / dpival
789789
hinch = self._height / dpival

0 commit comments

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