Guard against EVT_PAINT recurrsion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@23998 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -79,6 +79,8 @@ class wxEditor(wxScrolledWindow):
|
||||
pos, size,
|
||||
style|wxWANTS_CHARS)
|
||||
|
||||
self.isDrawing = False
|
||||
|
||||
self.InitCoords()
|
||||
self.InitFonts()
|
||||
self.SetColors()
|
||||
@@ -167,8 +169,12 @@ class wxEditor(wxScrolledWindow):
|
||||
|
||||
def OnPaint(self, event):
|
||||
dc = wxPaintDC(self)
|
||||
if self.isDrawing:
|
||||
return
|
||||
self.isDrawing = True
|
||||
self.UpdateView(dc)
|
||||
self.AdjustScrollbars()
|
||||
wxCallAfter(self.AdjustScrollbars)
|
||||
self.isDrawing = False
|
||||
|
||||
def OnEraseBackground(self, evt):
|
||||
pass
|
||||
|
Reference in New Issue
Block a user