← Back to team overview

kicad-developers team mailing list archive

Re: Re: TODO.txt item L1)

 

The hot key implementation is defined in WinEDA_DrawPanel: :OnKeyEvent( )
so the DrawPanel would need the focus not the main frame window in order
to restore normal hot key functionality. wxWidgets events get passed up
the stack from child to parent unless Skip() is called in the event
handler. It's crucial to remember this relationship to get the keyboard
input directed to the correct window. Otherwise, the user will be
forced to click on the window to move the focus which typically is not
obvious to the user. It may make sense to force the focus to the draw
panel any time the main window receives the focus to prevent this behavior.

Wayne

A good way to solve this could be in the main window to have a Get Focus Event handler that give the focus to its WinEDA_DrawPanel.
With this handler, the current layer_widget code should work.
--
Jean-Pierre CHARRAS



Thanks to both of you!


A related solution comes to mind from your ideas, which is to pass a focus owner to the layer widget's constructor as an additional parameter.

I tried this and it worked, case closed.

Thanks again,

Dick






References