bug or changend behaviour in wxpy2.9.4 final?

hi all, I’ve discovered that the charts of my application have now a black background (and bad drawing if I open more than one) instead of a white one. This new behaviour started with wxpy 2.9.4 final (it worked fine up to 2.9.4 b20120628 and also with wxpy 2.8). I’ve cut out a sample from my application so that the problem should be reproducible without dependancies. Haven’t found nothing on wxwidgets trac that could suggest changes (maybe there was a bug in my application and only now becomes evident).
Tried with: WinVista, py2.6 (tested also on py2.5), wxpython 2.9.4 final

thanks in advance for hints or suggestions,

Marco

aItemChartView.py (17.4 KB)

It appears to have already been fixed for 2.9.5. IIRC, there was a change that was recently reverted that had to do with how Clear is implemented for wxGraphicsContext, so it looks like that may be what caused your issue. As a workaround in your case you can do the clear on the bdc instead of the dc:

     def OnPaint(self, event):
         bdc = wx.BufferedPaintDC(self)
         try:
             dc = wx.GCDC(bdc)
         except:
             dc = bdc
         bg = wx.Brush(self.GetBackgroundColour())
         bdc.SetBackground(bg)
         bdc.Clear()
         self.PrepareDC(dc)
  ...

···

On 8/16/12 8:27 AM, Marco Prosperi wrote:

hi all, I've discovered that the charts of my application have now a
black background (and bad drawing if I open more than one) instead of a
white one. This new behaviour started with wxpy 2.9.4 final (it worked
fine up to 2.9.4 b20120628 and also with wxpy 2.8). I've cut out a
sample from my application so that the problem should be reproducible
without dependancies. Haven't found nothing on wxwidgets trac that could
suggest changes (maybe there was a bug in my application and only now
becomes evident).
Tried with: WinVista, py2.6 (tested also on py2.5), wxpython 2.9.4 final

thanks in advance for hints or suggestions,

--
Robin Dunn
Software Craftsman