diff --git a/common/widgets/lib_tree.cpp b/common/widgets/lib_tree.cpp index ea5f7f338e..4d6ae7015f 100644 --- a/common/widgets/lib_tree.cpp +++ b/common/widgets/lib_tree.cpp @@ -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() ); }