Pcbnew: make search field focused by default in Find dialog
This commit is contained in:
parent
0ba11e9856
commit
d00810c0fb
|
@ -383,6 +383,16 @@ void DIALOG_FIND::OnCloseButtonClick( wxCommandEvent& aEvent )
|
||||||
aEvent.Skip();
|
aEvent.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DIALOG_FIND::Show( bool show )
|
||||||
|
{
|
||||||
|
bool ret = DIALOG_FIND_BASE::Show( show );
|
||||||
|
|
||||||
|
if( show )
|
||||||
|
m_searchCombo->SetFocus();
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void DIALOG_FIND::OnClose( wxCloseEvent& aEvent )
|
void DIALOG_FIND::OnClose( wxCloseEvent& aEvent )
|
||||||
{
|
{
|
||||||
|
|
|
@ -68,6 +68,14 @@ public:
|
||||||
*/
|
*/
|
||||||
void FindNext() { search( true ); }
|
void FindNext() { search( true ); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Show method is overridden to make the search combobox
|
||||||
|
* focused by default.
|
||||||
|
* wxShowEvent is not suitable here because it supports MSW
|
||||||
|
* and GTK only.
|
||||||
|
*/
|
||||||
|
bool Show( bool show = true ) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void OnClose( wxCloseEvent& event ) override;
|
void OnClose( wxCloseEvent& event ) override;
|
||||||
void OnCloseButtonClick( wxCommandEvent& aEvent ) override;
|
void OnCloseButtonClick( wxCommandEvent& aEvent ) override;
|
||||||
|
|
|
@ -168,6 +168,10 @@ void DIALOG_FIND::OnCloseButtonClick( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool DIALOG_FIND::Show( bool show )
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
void DIALOG_FIND::OnClose( wxCloseEvent& aEvent )
|
void DIALOG_FIND::OnClose( wxCloseEvent& aEvent )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue