Fix the search widget to process <enter>.
This commit is contained in:
parent
7a1e8520ae
commit
a4237c3346
|
@ -54,7 +54,7 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, LIB_TABLE* aLibTable,
|
|||
auto search_sizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_query_ctrl = new wxSearchCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition,
|
||||
wxDefaultSize, wxTE_PROCESS_ENTER );
|
||||
wxDefaultSize );
|
||||
|
||||
m_query_ctrl->ShowCancelButton( true );
|
||||
|
||||
|
@ -71,9 +71,10 @@ LIB_TREE::LIB_TREE( wxWindow* aParent, LIB_TABLE* aLibTable,
|
|||
sizer->Add( search_sizer, 0, wxEXPAND, 5 );
|
||||
|
||||
m_query_ctrl->Bind( wxEVT_TEXT, &LIB_TREE::onQueryText, this );
|
||||
m_query_ctrl->Bind( wxEVT_TEXT_ENTER, &LIB_TREE::onQueryEnter, this );
|
||||
m_query_ctrl->Bind( wxEVT_SEARCH, &LIB_TREE::onQueryEnter, this );
|
||||
m_query_ctrl->Bind( wxEVT_CHAR_HOOK, &LIB_TREE::onQueryCharHook, this );
|
||||
|
||||
|
||||
Bind( wxEVT_TIMER, &LIB_TREE::onDebounceTimer, this, m_debounceTimer->GetId() );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue