Browse Source

Pcbnew: make search field focused by default in Find dialog

6.0.7
Konstantin Baranovskiy 4 years ago
committed by Seth Hillbrand
parent
commit
d00810c0fb
  1. 10
      pcbnew/dialogs/dialog_find.cpp
  2. 8
      pcbnew/dialogs/dialog_find.h
  3. 4
      qa/qa_utils/mocks.cpp

10
pcbnew/dialogs/dialog_find.cpp

@ -383,6 +383,16 @@ void DIALOG_FIND::OnCloseButtonClick( wxCommandEvent& aEvent )
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 )
{

8
pcbnew/dialogs/dialog_find.h

@ -68,6 +68,14 @@ public:
*/
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:
void OnClose( wxCloseEvent& event ) override;
void OnCloseButtonClick( wxCommandEvent& aEvent ) override;

4
qa/qa_utils/mocks.cpp

@ -168,6 +168,10 @@ void DIALOG_FIND::OnCloseButtonClick( wxCommandEvent& aEvent )
{
}
bool DIALOG_FIND::Show( bool show )
{
}
void DIALOG_FIND::OnClose( wxCloseEvent& aEvent )
{
}

Loading…
Cancel
Save