From 67eb138a4b5aa5eb15f21fe31951b0e4077f6710 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 25 Feb 2022 00:30:29 +0000 Subject: [PATCH] Fix copy/pasta. Fixes https://gitlab.com/kicad/code/kicad/issues/10957 --- .../dialog_global_edit_text_and_graphics.cpp | 14 ++++++++------ .../dialog_global_edit_text_and_graphics_base.cpp | 6 ++++-- .../dialog_global_edit_text_and_graphics_base.fbp | 3 ++- .../dialog_global_edit_text_and_graphics_base.h | 2 ++ 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp b/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp index 9ac41bb4f2..ba81dc73d9 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics.cpp @@ -84,7 +84,6 @@ public: ~DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS() override; protected: - void OnUpdateUI( wxUpdateUIEvent& event ) override; void OnReferenceFilterText( wxCommandEvent& event ) override { m_referenceFilterOpt->SetValue( true ); @@ -93,6 +92,14 @@ protected: { m_symbolFilterOpt->SetValue( true ); } + void OnFieldNameFilterText( wxCommandEvent& event ) override + { + m_fieldnameFilterOpt->SetValue( true ); + } + void OnNetFilterText( wxCommandEvent& event ) override + { + m_netFilterOpt->SetValue( true ); + } bool TransferDataToWindow() override; bool TransferDataFromWindow() override; @@ -230,11 +237,6 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow() } -void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::OnUpdateUI( wxUpdateUIEvent& ) -{ -} - - void DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::processItem( const SCH_SHEET_PATH& aSheetPath, SCH_ITEM* aItem ) { diff --git a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.cpp b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.cpp index c390ae999a..cc3b6a31a2 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.cpp +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.cpp @@ -411,9 +411,10 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_ // Connect Events this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnUpdateUI ) ); - m_fieldnameFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnReferenceFilterText ), NULL, this ); + m_fieldnameFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnFieldNameFilterText ), NULL, this ); m_referenceFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnReferenceFilterText ), NULL, this ); m_symbolFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnSymbolFilterText ), NULL, this ); + m_netFilter->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnNetFilterText ), NULL, this ); m_fontCtrl->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::onFontSelected ), NULL, this ); } @@ -421,9 +422,10 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::~DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS { // Disconnect Events this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnUpdateUI ) ); - m_fieldnameFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnReferenceFilterText ), NULL, this ); + m_fieldnameFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnFieldNameFilterText ), NULL, this ); m_referenceFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnReferenceFilterText ), NULL, this ); m_symbolFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnSymbolFilterText ), NULL, this ); + m_netFilter->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::OnNetFilterText ), NULL, this ); m_fontCtrl->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::onFontSelected ), NULL, this ); } diff --git a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.fbp b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.fbp index 1edc10856f..66a6c27ac7 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.fbp +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.fbp @@ -1034,7 +1034,7 @@ - OnReferenceFilterText + OnFieldNameFilterText @@ -1589,6 +1589,7 @@ + OnNetFilterText diff --git a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.h b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.h index 66b0ee2afa..e85892e263 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.h +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.h @@ -105,8 +105,10 @@ class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE : public DIALOG_SHIM // Virtual event handlers, overide them in your derived class virtual void OnUpdateUI( wxUpdateUIEvent& event ) { event.Skip(); } + virtual void OnFieldNameFilterText( wxCommandEvent& event ) { event.Skip(); } virtual void OnReferenceFilterText( wxCommandEvent& event ) { event.Skip(); } virtual void OnSymbolFilterText( wxCommandEvent& event ) { event.Skip(); } + virtual void OnNetFilterText( wxCommandEvent& event ) { event.Skip(); } virtual void onFontSelected( wxCommandEvent& event ) { event.Skip(); }