Fix wxassertionerror. Bitmap w or h should not be 0

This commit is contained in:
Metallicow
2020-08-08 00:43:29 -05:00
parent 8b670176d2
commit cca15e4490

View File

@@ -524,8 +524,8 @@ class PieCtrl(wx.Window):
def RecreateCanvas(self):
""" Recreates the :class:`PieCtrl` container (canvas). """
self._canvasbitmap = wx.Bitmap(self.GetSize().GetWidth(),
self.GetSize().GetHeight())
self._canvasbitmap = wx.Bitmap(self.GetSize().GetWidth() or 1,
self.GetSize().GetHeight() or 1)
self._canvasDC.SelectObject(self._canvasbitmap)