kicad-developers team mailing list archive
Mailing list archive
Mac & "invalid context"
I've been digging deeper into this issue and think I found the cause
of my problems with invalid graphic contexts:
The Mac port of wxWidgets does not support having nested contexts
In short, this means that the following is illegal and any draw
command will fail:
<- draw something here;
One example of where this is done in KiCad (this seems to be done all
over the place):
wxClientDC dc( DrawPanel );
This function eventually calls
WinEDA_BasePcbFrame::Compile_Ratsnest( wxDC* DC ...), which again
calls WinEDA_MsgPanel::EraseMsgBox(), which creates a new context:
wxClientDC dc( this );
This one is easy to fix, but there are more, to an unknown extent.
In general (I'm not familiar with wxWidgets), it's considered nice to
only draw stuff on the paint event itself. I guess this school of
thought is not followed in KiCad, either accidentally or for some
I'm wondering if anyone has any insights, ideas etc. about what to do
We are Elektropeople for a better living.