← Back to team overview

kicad-developers team mailing list archive

Re: Re: MacOSX - Pcbnew: Refresh issues with onload


Marco Serantoni wrote:
> --- In kicad-devel@xxxxxxxxxxxxxxx, Dick Hollenbeck <dick@...> wrote:
>> I would say find a way to fix this so we do not need the
>> #ifndef __WXMAX__

Agreed. This is not the way to solve this.

>> Maybe Wayne or Jean-Pierre and see a way to this.

I don't see how the Affiche_Status_Box() (I really need to rename this
UpdateStatusBar() because that's what it does) is causing the problem.
The device context used in the PcbNew draw panel should have nothing to
to with the device context used to draw the status bar. I don't have
access to a MAC and even if I did, it would take hours just getting the
build and development environment set up to do any testing. Not high on
my list of things to do. Can somebody else out there with a MAC take a
look at this?

>> It may simply be that we don't need the Affiche_Status_Box() calls for 
>> any OS at these specific locations. It seems like that would be true 
>> if Affiche_Status_Box() is managing a different "window or widget" at 
>> the operating system level.
>> It may be that a call to this function AT THIS LOCATION is a relic that 
>> was obsoleted after I re-wrote the Draw() function in the status window 
>> a year or so ago.

Try commenting out this line and see if the status bar continues to get
updated correctly. I can check it out on Linux and Windows, if the
status bar still gets updated correctly. I'll just remove the offending
line of code.

> On OSX the change is not affecting the correct behaviour of the statusbar, that still be refreshed by Mouse and other events. 
> Better implementations are welcome.
> Due my limited knowledge of the codebase i've proposed a conservative patch just to point and fix the problem and avoid to broke some other platforms: As Hippocrates used to say: "First, do no harm." :)
> Evidence of problems seems be:
> Thu Apr 2 22:18:21 snowball.local pcbnew[23127] <Error>: CGContextRestoreGState: invalid context
> Thu Apr 2 22:18:21 snowball.local pcbnew[23127] <Error>: CGContextRestoreGState: invalid context

Could this be a problem with the OSX version of wxWidgets since it
doesn't appear to effect Linux or Windows? Have you tried running a
debug build (debug build of wxWidgets too) to see if there are any
assert messages that occur before you get this error? It might be helpful.


> ------------------------------------
> Yahoo! Groups Links


Follow ups