Robin said :
Welcome back.
Thanks
> Amazingly, it still works
Cool!
Yes, especially as that code dates back to the time when wxPython
still had the "magic event handlers" (or something such). I fully
expected to be bitten by that, but it turns out I had actually heeded
your advice at the time and already put them in explicitely...
> I'm pretty sure this didn't happen two years ago, and I've run out of
> places to look. Is it something that has changed subtly in
> wxWindows since ?
Possible. Double check the parameters for all your draw methods, especially
the logical function used for drawing or blitting.
Sometimes the best way to solve a problem is to go through the effort to
duplicate the problem in a small sample to send to me. Often people
discover the problem themselves while doing that.
I can certainly relate to that - but it's probably a major undertaking in
this case :)... I'll resort to that if nothing else works. In the
meanwhile, it did have the merit to make me freshen up on the wxDC
API, and learn a few things I'd overlooked (or didn't exist at the time).
Preliminary findings : the problem is definitely with the wxCOPY
logical func and the DrawRectangle method, in that particular event
handler (left button down). wxCLEAR, for instance, works as
expected.
Also, if I use the exact same brush with SetBackground instead of
SetBrush, and wxDC.Clear() instead of wxDC.DrawRectangle(), the
problem (mostly) goes away.
At first I thought it was totally gone, but under intensive testing (ie
actually playing the game and shuffling a lot of cards around it
does sometimes occur, albeit rarely & randomly instead of
systematically. So I'm not ruling out some weird video/driver/timing
bug on my system just yet.
Right now I need to a) upgrade to the very latest wxPython on my
home system (I think I'm one rev behind), and b) bring the package
to work for testing on a couple of different platforms. If the problem
persists it'll be time for Plan B (Robin's :-).
Thanks for your help,
fred