Make the Paint DC before checking if we don't need to paint

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18565 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-01-04 04:16:21 +00:00
parent 30b1489968
commit c2b281c55b

View File

@@ -100,10 +100,11 @@ class wxGenStaticText(wxPyControl):
def OnPaint(self, event):
dc = wxBufferedPaintDC(self)
#dc = wxPaintDC(self)
width, height = self.GetClientSize()
if not width or not height:
return
dc = wxBufferedPaintDC(self)
dc.SetBackground(wxBrush(self.GetBackgroundColour(), wxSOLID))
dc.SetTextForeground(self.GetForegroundColour())
dc.Clear()