← Back to team overview

kicad-developers team mailing list archive

Re: Re: TODO.txt item L1)

 

jeanpierre_charras wrote:
--- In kicad-devel@xxxxxxxxxxxxxxx, Dick Hollenbeck <dick@...> wrote:

Can somebody spend some time and do some research on this L1) problem for me please?

See TODO.txt.


Dick,
I believe wxWidget has no problem:
the bug is in passOnFocus()
passOnFocus() assume this is the parent that had the focus:


void LAYER_WIDGET::passOnFocus()
{
wxWindow* parent = GetParent();
parent->SetFocus();
}

This is false, and the focus is not set to the right window.


Here is a change in layer_widget.cpp that fixes this problem:

1)
parent->SetFocus();
changed to
// parent->SetFocus();

2) Line 630
wxWindow* w = FindFocus();
getLayerComp( newNdx + 1 /* 1 is column */ )->SetFocus();
if ( w ) w->SetFocus();


This is an ugly hack, that needs to be more tested, but it works.


Jean-Pierre Charras

Jean-Pierre,

Thanks for your efforts here.

However, I do not think we are working towards the same goal, unless I misunderstand your solution.

My goal is to give the focus back to the APP, I don't want the focus, because the focus is where keyboard entry goes to. We have hotkeys in PCBNEW, and when the LAYER_WIDGET has the focus, then it gets the keys and then the hotkeys do not work. We want to return the focus back to the topmost frame so it can handle the hotkeys again.

Is yours a solution to this problem or to some other problem? It looks like you are setting focus on a LAYER_WIDGET child, and I don't see how this could possibly enable HOT KEYS that are handled back up in the Pcb_Frame.


Thanks,

Dick







Follow ups

References