Wire up <return> for eeschema find dialog.
Fixes: lp:1749026 * https://bugs.launchpad.net/kicad/+bug/1749026
This commit is contained in:
parent
3ee93caafe
commit
ac09cfaef4
|
@ -132,6 +132,12 @@ void DIALOG_SCH_FIND::OnUpdateWildcardUI( wxUpdateUIEvent& aEvent )
|
|||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::OnTextEnter( wxCommandEvent& aEvent )
|
||||
{
|
||||
OnFind( aEvent );
|
||||
}
|
||||
|
||||
|
||||
void DIALOG_SCH_FIND::OnFind( wxCommandEvent& aEvent )
|
||||
{
|
||||
int index = m_comboFind->FindString( m_comboFind->GetValue(), true );
|
||||
|
|
|
@ -155,6 +155,7 @@ class DIALOG_SCH_FIND : public DIALOG_SCH_FIND_BASE
|
|||
protected:
|
||||
// Handlers for DIALOG_SCH_FIND_BASE events.
|
||||
void OnClose( wxCloseEvent& aEvent ) override;
|
||||
void OnTextEnter( wxCommandEvent& event ) override;
|
||||
void OnUpdateFindUI( wxUpdateUIEvent& aEvent ) override;
|
||||
void OnUpdateReplaceUI( wxUpdateUIEvent& aEvent ) override;
|
||||
void OnUpdateReplaceAllUI( wxUpdateUIEvent& aEvent ) override;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2015)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "dialog_schematic_find_base.h"
|
||||
|
@ -29,7 +29,7 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
|
|||
m_staticText1->Wrap( -1 );
|
||||
leftGridSizer->Add( m_staticText1, 0, wxEXPAND|wxLEFT|wxRIGHT, 6 );
|
||||
|
||||
m_comboFind = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN );
|
||||
m_comboFind = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxTE_PROCESS_ENTER );
|
||||
m_comboFind->SetToolTip( _("Text with optional wildcards") );
|
||||
m_comboFind->SetMinSize( wxSize( 125,-1 ) );
|
||||
|
||||
|
@ -41,7 +41,7 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
leftGridSizer->Add( m_staticReplace, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
|
||||
|
||||
m_comboReplace = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
|
||||
m_comboReplace = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxTE_PROCESS_ENTER );
|
||||
m_comboReplace->Hide();
|
||||
|
||||
leftGridSizer->Add( m_comboReplace, 0, wxALL|wxEXPAND, 5 );
|
||||
|
@ -137,7 +137,9 @@ DIALOG_SCH_FIND_BASE::DIALOG_SCH_FIND_BASE( wxWindow* parent, wxWindowID id, con
|
|||
|
||||
// Connect Events
|
||||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SCH_FIND_BASE::OnClose ) );
|
||||
m_comboFind->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
|
||||
m_comboFind->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
|
||||
m_comboReplace->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
|
||||
m_comboReplace->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
|
||||
m_checkWholeWord->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWholeWordUI ), NULL, this );
|
||||
m_checkWildcardMatch->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWildcardUI ), NULL, this );
|
||||
|
@ -154,7 +156,9 @@ DIALOG_SCH_FIND_BASE::~DIALOG_SCH_FIND_BASE()
|
|||
{
|
||||
// Disconnect Events
|
||||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_SCH_FIND_BASE::OnClose ) );
|
||||
m_comboFind->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
|
||||
m_comboFind->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
|
||||
m_comboReplace->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_SCH_FIND_BASE::OnTextEnter ), NULL, this );
|
||||
m_comboReplace->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateDrcUI ), NULL, this );
|
||||
m_checkWholeWord->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWholeWordUI ), NULL, this );
|
||||
m_checkWildcardMatch->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_SCH_FIND_BASE::OnUpdateWildcardUI ), NULL, this );
|
||||
|
|
|
@ -252,7 +252,7 @@
|
|||
<property name="selection">-1</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style">wxCB_DROPDOWN</property>
|
||||
<property name="style">wxCB_DROPDOWN|wxTE_PROCESS_ENTER</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Text with optional wildcards</property>
|
||||
|
@ -266,6 +266,8 @@
|
|||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCombobox"></event>
|
||||
<event name="OnComboboxCloseup"></event>
|
||||
<event name="OnComboboxDropdown"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -288,7 +290,7 @@
|
|||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextEnter">OnTextEnter</event>
|
||||
<event name="OnUpdateUI">OnUpdateDrcUI</event>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -426,7 +428,7 @@
|
|||
<property name="selection">-1</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="style">wxTE_PROCESS_ENTER</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
|
@ -440,6 +442,8 @@
|
|||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCombobox"></event>
|
||||
<event name="OnComboboxCloseup"></event>
|
||||
<event name="OnComboboxDropdown"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
|
@ -462,7 +466,7 @@
|
|||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextEnter">OnTextEnter</event>
|
||||
<event name="OnUpdateUI">OnUpdateDrcUI</event>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
///////////////////////////////////////////////////////////////////////////
|
||||
// C++ code generated with wxFormBuilder (version Mar 28 2015)
|
||||
// C++ code generated with wxFormBuilder (version Dec 30 2017)
|
||||
// http://www.wxformbuilder.org/
|
||||
//
|
||||
// PLEASE DO "NOT" EDIT THIS FILE!
|
||||
// PLEASE DO *NOT* EDIT THIS FILE!
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __DIALOG_SCHEMATIC_FIND_BASE_H__
|
||||
|
@ -11,8 +11,6 @@
|
|||
#include <wx/artprov.h>
|
||||
#include <wx/xrc/xmlres.h>
|
||||
#include <wx/intl.h>
|
||||
class DIALOG_SHIM;
|
||||
|
||||
#include "dialog_shim.h"
|
||||
#include <wx/string.h>
|
||||
#include <wx/stattext.h>
|
||||
|
@ -61,6 +59,7 @@ class DIALOG_SCH_FIND_BASE : public DIALOG_SHIM
|
|||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnClose( wxCloseEvent& event ) { event.Skip(); }
|
||||
virtual void OnTextEnter( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateDrcUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateWholeWordUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
virtual void OnUpdateWildcardUI( wxUpdateUIEvent& event ) { event.Skip(); }
|
||||
|
|
Loading…
Reference in New Issue