Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a409c01 + d48114e commit de1e1f1Copy full SHA for de1e1f1
1 file changed
lib/matplotlib/backends/backend_wx.py
@@ -948,8 +948,21 @@ def _onSize(self, evt):
948
"""
949
950
DEBUG_MSG("_onSize()", 2, self)
951
+ sz = self.GetParent().GetSizer()
952
+ if sz:
953
+ si = sz.GetItem(self)
954
+ if sz and si and not si.Proportion and not si.Flag & wx.EXPAND:
955
+ # managed by a sizer, but with a fixed size
956
+ size = self.GetMinSize()
957
+ else:
958
+ # variable size
959
+ size = self.GetClientSize()
960
+ if getattr(self, "_width", None):
961
+ if size == (self._width, self._height):
962
+ # no change in size
963
+ return
964
+ self._width, self._height = size
965
# Create a new, correctly sized bitmap
- self._width, self._height = self.GetClientSize()
966
self.bitmap = wxc.EmptyBitmap(self._width, self._height)
967
968
self._isDrawn = False
0 commit comments