Remove unnecessary wxSearchCtrl::OnSetFocus()
This was useless as wxCompositeWindow, from which the generic wxSearchCtrl derives, already sets focus to its first child and, since the last commit, even harmful as it now resulted in calls to SetFocus() from inside wxEVT_SET_FOCUS handler which is forbidden at least under MSW. See #15569.
This commit is contained in:
@@ -223,7 +223,6 @@ protected:
|
|||||||
|
|
||||||
void OnCancelButton( wxCommandEvent& event );
|
void OnCancelButton( wxCommandEvent& event );
|
||||||
|
|
||||||
void OnSetFocus( wxFocusEvent& event );
|
|
||||||
void OnSize( wxSizeEvent& event );
|
void OnSize( wxSizeEvent& event );
|
||||||
|
|
||||||
bool HasMenu() const
|
bool HasMenu() const
|
||||||
|
@@ -241,7 +241,6 @@ wxEND_EVENT_TABLE()
|
|||||||
|
|
||||||
wxBEGIN_EVENT_TABLE(wxSearchCtrl, wxSearchCtrlBase)
|
wxBEGIN_EVENT_TABLE(wxSearchCtrl, wxSearchCtrlBase)
|
||||||
EVT_SEARCHCTRL_CANCEL_BTN(wxID_ANY, wxSearchCtrl::OnCancelButton)
|
EVT_SEARCHCTRL_CANCEL_BTN(wxID_ANY, wxSearchCtrl::OnCancelButton)
|
||||||
EVT_SET_FOCUS(wxSearchCtrl::OnSetFocus)
|
|
||||||
EVT_SIZE(wxSearchCtrl::OnSize)
|
EVT_SIZE(wxSearchCtrl::OnSize)
|
||||||
wxEND_EVENT_TABLE()
|
wxEND_EVENT_TABLE()
|
||||||
|
|
||||||
@@ -1235,14 +1234,6 @@ void wxSearchCtrl::OnCancelButton( wxCommandEvent& event )
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxSearchCtrl::OnSetFocus( wxFocusEvent& /*event*/ )
|
|
||||||
{
|
|
||||||
if ( m_text )
|
|
||||||
{
|
|
||||||
m_text->SetFocus();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void wxSearchCtrl::OnSize( wxSizeEvent& WXUNUSED(event) )
|
void wxSearchCtrl::OnSize( wxSizeEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
LayoutControls();
|
LayoutControls();
|
||||||
|
Reference in New Issue
Block a user