Don't reset focus flag yet on non-GTK platforms. It's required.

Fixes https://gitlab.com/kicad/code/kicad/issues/7671
This commit is contained in:
Jeff Young 2021-02-23 17:19:55 +00:00
parent 154d56b4f4
commit b48071015b
1 changed files with 3 additions and 0 deletions

View File

@ -201,11 +201,14 @@ void GRID_CELL_LAYER_SELECTOR::Reset()
void GRID_CELL_LAYER_SELECTOR::onComboDropDown( wxCommandEvent& aEvent ) void GRID_CELL_LAYER_SELECTOR::onComboDropDown( wxCommandEvent& aEvent )
{ {
// On other platforms this is done in BeginEdit()
#if defined(__WXGTK20__)
auto evtHandler = static_cast<wxGridCellEditorEvtHandler*>( m_control->GetEventHandler() ); auto evtHandler = static_cast<wxGridCellEditorEvtHandler*>( m_control->GetEventHandler() );
// Once the combobox is dropped, reset the flag to allow the focus-loss handler // Once the combobox is dropped, reset the flag to allow the focus-loss handler
// to function and close the editor. // to function and close the editor.
evtHandler->SetInSetFocus( false ); evtHandler->SetInSetFocus( false );
#endif
} }