A more targetted fix at the focus issue.
Fixes https://gitlab.com/kicad/code/kicad/issues/5477
This commit is contained in:
parent
b1343ca281
commit
0ec4c4fe65
|
@ -243,11 +243,14 @@ void DIALOG_PAD_PROPERTIES::OnCancel( wxCommandEvent& event )
|
||||||
void DIALOG_PAD_PROPERTIES::autoSelectPreview( int aPage )
|
void DIALOG_PAD_PROPERTIES::autoSelectPreview( int aPage )
|
||||||
{
|
{
|
||||||
// This is the place to turn auto-select off.
|
// This is the place to turn auto-select off.
|
||||||
|
|
||||||
|
// We have focus issues on GTK when we try to set the notebook page while a user is
|
||||||
|
// typing into a text control.
|
||||||
wxWindow* focus = FindFocus();
|
wxWindow* focus = FindFocus();
|
||||||
|
|
||||||
m_previewNotebook->ChangeSelection( aPage );
|
m_previewNotebook->ChangeSelection( aPage );
|
||||||
|
|
||||||
if( focus )
|
if( focus && dynamic_cast<wxTextEntry*>( focus ) )
|
||||||
focus->SetFocus();
|
focus->SetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue