Add search control to the focus guard

This commit is contained in:
Marek Roszko 2021-07-05 11:39:05 -04:00
parent 2d696c3606
commit f524d9bec2
1 changed files with 4 additions and 1 deletions

View File

@ -20,6 +20,7 @@
#include <wx/dcclient.h>
#include <wx/listbox.h>
#include <wx/dataview.h>
#include <wx/srchctrl.h>
#include <wx/stc/stc.h>
#include <widgets/ui_common.h>
@ -170,12 +171,14 @@ void KIUI::SelectReferenceNumber( wxTextEntry* aTextEntry )
bool KIUI::IsInputControlFocused()
{
wxWindow* focus = wxWindow::FindFocus();
wxTextEntry* textEntry = dynamic_cast<wxTextEntry*>( focus );
wxStyledTextCtrl* styledText = dynamic_cast<wxStyledTextCtrl*>( focus );
wxListBox* listBox = dynamic_cast<wxListBox*>( focus );
wxDataViewCtrl* dataViewCtrl = dynamic_cast<wxDataViewCtrl*>( focus );
wxSearchCtrl* searchCtrl = dynamic_cast<wxSearchCtrl*>( focus );
return ( textEntry || styledText || listBox || dataViewCtrl );
return ( textEntry || styledText || listBox || dataViewCtrl || searchCtrl );
}