Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit2046cde

Browse files
QuLogicmeeseeksmachine
authored andcommitted
Backport PR#17261: avoid calling wx.Bitmap() if width or height is zero
1 parent2f4a3e3 commit2046cde

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎lib/matplotlib/backends/backend_wx.py

Lines 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
ifself._width<=1orself._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)

[8]ページ先頭

©2009-2025 Movatter.jp