Commits

Anonymous committed 626a548

Fix drawing issues under 2.9 on Windows

Comments (0)

Files changed (1)

src/eclib/platebtn.py

 
     def __DrawButton(self):
         """Draw the button"""
-        # TODO using a buffered paintdc on windows with the nobg style
-        #      causes lots of weird drawing. So currently the use of a
-        #      buffered dc is dissabled for this style.
-        if PB_STYLE_NOBG & self._style:
-            dc = wx.PaintDC(self)
-        else:
-            dc = wx.AutoBufferedPaintDCFactory(self)
-
+        dc = wx.PaintDC(self)
         gc = wx.GCDC(dc)
 
         # Setup
         @param evt: wx.EVT_ERASE_BACKGROUND
 
         """
-        pass
+        if not (PB_STYLE_NOBG & self._style):
+            evt.Skip()
 
     def OnFocus(self, evt):
         """Set the visual focus state if need be"""