eeschema/add_component setfocus moved into OnInitDialog
SetFocus executed by OnInitDialog wxInitDialogEvent handler
This commit is contained in:
parent
b54e77e466
commit
1a05c8a5a8
|
@ -44,7 +44,6 @@ DIALOG_CHOOSE_COMPONENT::DIALOG_CHOOSE_COMPONENT( SCH_BASE_FRAME* aParent, const
|
|||
m_external_browser_requested = false;
|
||||
m_received_doubleclick_in_tree = false;
|
||||
m_search_container->SetTree( m_libraryComponentTree );
|
||||
m_searchBox->SetFocus();
|
||||
m_componentDetails->SetEditable( false );
|
||||
m_componentView->SetLayoutDirection( wxLayout_LeftToRight );
|
||||
|
||||
|
@ -71,6 +70,11 @@ DIALOG_CHOOSE_COMPONENT::~DIALOG_CHOOSE_COMPONENT()
|
|||
m_search_container->SetTree( NULL );
|
||||
}
|
||||
|
||||
void DIALOG_CHOOSE_COMPONENT::OnInitDialog( wxInitDialogEvent& event )
|
||||
{
|
||||
m_searchBox->SetFocus();
|
||||
}
|
||||
|
||||
|
||||
LIB_ALIAS* DIALOG_CHOOSE_COMPONENT::GetSelectedAlias( int* aUnit ) const
|
||||
{
|
||||
|
|
|
@ -54,6 +54,7 @@ public:
|
|||
COMPONENT_TREE_SEARCH_CONTAINER* const aSearchContainer,
|
||||
int aDeMorganConvert );
|
||||
virtual ~DIALOG_CHOOSE_COMPONENT();
|
||||
void OnInitDialog( wxInitDialogEvent& event ) override;
|
||||
|
||||
/** Function GetSelectedAlias
|
||||
* To be called after this dialog returns from ShowModal().
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jan 15 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -66,6 +66,7 @@ DIALOG_CHOOSE_COMPONENT_BASE::DIALOG_CHOOSE_COMPONENT_BASE( wxWindow* parent, wx
|
|||
this->Centre( wxBOTH );
|
||||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnInitDialog ) );
|
||||
m_searchBox->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnInterceptSearchBoxKey ), NULL, this );
|
||||
m_searchBox->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnSearchBoxChange ), NULL, this );
|
||||
m_searchBox->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnSearchBoxEnter ), NULL, this );
|
||||
|
@ -80,6 +81,7 @@ DIALOG_CHOOSE_COMPONENT_BASE::DIALOG_CHOOSE_COMPONENT_BASE( wxWindow* parent, wx
|
|||
DIALOG_CHOOSE_COMPONENT_BASE::~DIALOG_CHOOSE_COMPONENT_BASE()
|
||||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnInitDialog ) );
|
||||
m_searchBox->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnInterceptSearchBoxKey ), NULL, this );
|
||||
m_searchBox->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnSearchBoxChange ), NULL, this );
|
||||
m_searchBox->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_CHOOSE_COMPONENT_BASE::OnSearchBoxEnter ), NULL, this );
|
||||
|
|
|
@ -67,7 +67,7 @@
|
|||
<event name="OnHibernate"></event>
|
||||
<event name="OnIconize"></event>
|
||||
<event name="OnIdle"></event>
|
||||
<event name="OnInitDialog"></event>
|
||||
<event name="OnInitDialog">OnInitDialog</event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2015)
|
||||
// C++ code generated with wxFormBuilder (version Jan 15 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
|
@ -48,6 +48,7 @@ class DIALOG_CHOOSE_COMPONENT_BASE : public DIALOG_SHIM
|
|||
wxButton* m_stdButtonsCancel;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnInitDialog( wxInitDialogEvent& event ) { event.Skip(); }
|
||||
virtual void OnInterceptSearchBoxKey( wxKeyEvent& event ) { event.Skip(); }
|
||||
virtual void OnSearchBoxChange( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnSearchBoxEnter( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
|
Loading…
Reference in New Issue