diff --git a/docs/changes.txt b/docs/changes.txt index 2eb8dec213..92185677df 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -38,6 +38,11 @@ wxMSW: - Switching page of a hidden notebook doesn't lose focus (Jamie Gadd). - Removed wxImageList *GetImageList(int) const. +wxGTK: + +- Fixed problem with choice editor in wxGrid whereby the editor + lost focus when the combobox menu was shown. + wxWinCE: - Pressing build-in joystick on WinCE phones fires wxEVT_JOY_BUTTON_DOWN event. diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index c52334ed7c..99090322c0 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -1488,7 +1488,13 @@ void wxGridCellChoiceEditor::BeginEdit(int row, int col, wxGrid* grid) Combo()->SetFocus(); if (evtHandler) + { + // When dropping down the menu, a kill focus event + // happens after this point, so we can't reset the flag yet. +#if !defined(__WXGTK20__) evtHandler->SetInSetFocus(false); +#endif + } } bool wxGridCellChoiceEditor::EndEdit(int row, int col,