Allow case-insensitive filtering and filter on keystrokes.
Fixes https://gitlab.com/kicad/code/kicad/issues/5177
This commit is contained in:
parent
672224106c
commit
94ef2781bf
|
@ -536,17 +536,17 @@ void DIALOG_COPPER_ZONE::buildAvailableListOfNets()
|
|||
|
||||
if( m_NetFiltering )
|
||||
{
|
||||
wxString doNotShowFilter = m_DoNotShowNetNameFilter->GetValue();
|
||||
wxString ShowFilter = m_ShowNetNameFilter->GetValue();
|
||||
wxString doNotShowFilter = m_DoNotShowNetNameFilter->GetValue().Lower();
|
||||
wxString ShowFilter = m_ShowNetNameFilter->GetValue().Lower();
|
||||
|
||||
for( unsigned ii = 0; ii < listNetName.GetCount(); ii++ )
|
||||
{
|
||||
if( listNetName[ii].Matches( doNotShowFilter ) )
|
||||
if( listNetName[ii].Lower().Matches( doNotShowFilter ) )
|
||||
{
|
||||
listNetName.RemoveAt( ii );
|
||||
ii--;
|
||||
}
|
||||
else if( !listNetName[ii].Matches( ShowFilter ) )
|
||||
else if( !listNetName[ii].Lower().Matches( ShowFilter ) )
|
||||
{
|
||||
listNetName.RemoveAt( ii );
|
||||
ii--;
|
||||
|
|
|
@ -410,7 +410,9 @@ DIALOG_COPPER_ZONE_BASE::DIALOG_COPPER_ZONE_BASE( wxWindow* parent, wxWindowID i
|
|||
this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_COPPER_ZONE_BASE::OnClose ) );
|
||||
this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_COPPER_ZONE_BASE::OnUpdateUI ) );
|
||||
m_layers->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_COPPER_ZONE_BASE::OnLayerSelection ), NULL, this );
|
||||
m_DoNotShowNetNameFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnRunFiltersButtonClick ), NULL, this );
|
||||
m_DoNotShowNetNameFilter->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnRunFiltersButtonClick ), NULL, this );
|
||||
m_ShowNetNameFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnRunFiltersButtonClick ), NULL, this );
|
||||
m_ShowNetNameFilter->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnRunFiltersButtonClick ), NULL, this );
|
||||
m_buttonRunFilter->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnRunFiltersButtonClick ), NULL, this );
|
||||
m_showAllNetsOpt->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnNetSortingOptionSelected ), NULL, this );
|
||||
|
@ -426,7 +428,9 @@ DIALOG_COPPER_ZONE_BASE::~DIALOG_COPPER_ZONE_BASE()
|
|||
this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_COPPER_ZONE_BASE::OnClose ) );
|
||||
this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_COPPER_ZONE_BASE::OnUpdateUI ) );
|
||||
m_layers->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_VALUE_CHANGED, wxDataViewEventHandler( DIALOG_COPPER_ZONE_BASE::OnLayerSelection ), NULL, this );
|
||||
m_DoNotShowNetNameFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnRunFiltersButtonClick ), NULL, this );
|
||||
m_DoNotShowNetNameFilter->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnRunFiltersButtonClick ), NULL, this );
|
||||
m_ShowNetNameFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnRunFiltersButtonClick ), NULL, this );
|
||||
m_ShowNetNameFilter->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnRunFiltersButtonClick ), NULL, this );
|
||||
m_buttonRunFilter->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnRunFiltersButtonClick ), NULL, this );
|
||||
m_showAllNetsOpt->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_COPPER_ZONE_BASE::OnNetSortingOptionSelected ), NULL, this );
|
||||
|
|
|
@ -318,6 +318,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnText">OnRunFiltersButtonClick</event>
|
||||
<event name="OnTextEnter">OnRunFiltersButtonClick</event>
|
||||
</object>
|
||||
</object>
|
||||
|
@ -444,6 +445,7 @@
|
|||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnText">OnRunFiltersButtonClick</event>
|
||||
<event name="OnTextEnter">OnRunFiltersButtonClick</event>
|
||||
</object>
|
||||
</object>
|
||||
|
|
Loading…
Reference in New Issue