Replace wxEVT_GRID_HIDE_EDITOR usage with CallAfter

This simplifies the code by removing the need for a special event,
and also means the combox popup handler is no longer needed to reset
the inSetFocus flag for the closing handler.
This commit is contained in:
Ian McInerney
2020-07-13 00:32:06 +01:00
parent 8b7fdc5e5b
commit b256aa6956
5 changed files with 20 additions and 49 deletions

View File

@@ -2827,7 +2827,6 @@ protected:
void OnKeyDown( wxKeyEvent& );
void OnKeyUp( wxKeyEvent& );
void OnChar( wxKeyEvent& );
void OnHideEditor( wxCommandEvent& );
bool SetCurrentCell( const wxGridCellCoords& coords );

View File

@@ -27,6 +27,8 @@ public:
{
}
void DismissEditor();
void OnKillFocus(wxFocusEvent& event);
void OnKeyDown(wxKeyEvent& event);
void OnChar(wxKeyEvent& event);
@@ -335,8 +337,7 @@ public:
protected:
wxComboBox *Combo() const { return (wxComboBox *)m_control; }
void onComboCloseUp(wxCommandEvent& evt);
void onComboDropDown(wxCommandEvent& evt);
void OnComboCloseUp(wxCommandEvent& evt);
wxString m_value;
wxArrayString m_choices;

View File

@@ -17,10 +17,6 @@
#include "wx/headerctrl.h"
// Internally used (and hence intentionally not exported) event telling wxGrid
// to hide the currently shown editor.
wxDECLARE_EVENT( wxEVT_GRID_HIDE_EDITOR, wxCommandEvent );
// ----------------------------------------------------------------------------
// array classes
// ----------------------------------------------------------------------------