From 91e4d5e0eaaf513986d877f7780e380d487c33f0 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Wed, 13 Jul 2022 16:43:33 -0700 Subject: [PATCH] Add Apply button to "Edit Text and Graphics" Allows the user to apply multiple sets of changes without closing the window Fixes https://gitlab.com/kicad/code/kicad/issues/11904 --- .../dialogs/dialog_global_edit_text_and_graphics_base.cpp | 4 +++- .../dialogs/dialog_global_edit_text_and_graphics_base.fbp | 7 +++++-- .../dialogs/dialog_global_edit_text_and_graphics_base.h | 6 ++++-- .../dialogs/dialog_global_edit_text_and_graphics_base.cpp | 6 ++++-- .../dialogs/dialog_global_edit_text_and_graphics_base.fbp | 7 +++++-- pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.h | 6 ++++-- 6 files changed, 25 insertions(+), 11 deletions(-) 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 b0e2f104ef..ebee7314c1 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.cpp +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -401,6 +401,8 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_ m_sdbSizerButtons = new wxStdDialogButtonSizer(); m_sdbSizerButtonsOK = new wxButton( this, wxID_OK ); m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK ); + m_sdbSizerButtonsApply = new wxButton( this, wxID_APPLY ); + m_sdbSizerButtons->AddButton( m_sdbSizerButtonsApply ); m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL ); m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel ); m_sdbSizerButtons->Realize(); 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 5ad9bc8d5c..11bfb3ebeb 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.fbp +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_global_edit_text_and_graphics_base 1000 none + 1 dialog_global_edit_text_and_graphics @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Edit Text and Graphic Properties + 0 @@ -4270,7 +4273,7 @@ wxALL|wxEXPAND 0 - 0 + 1 1 0 0 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 80db228cc4..af37561923 100644 --- a/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.h +++ b/eeschema/dialogs/dialog_global_edit_text_and_graphics_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -103,9 +103,10 @@ class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE : public DIALOG_SHIM COLOR_SWATCH* m_dotColorSwatch; wxStdDialogButtonSizer* m_sdbSizerButtons; wxButton* m_sdbSizerButtonsOK; + wxButton* m_sdbSizerButtonsApply; wxButton* m_sdbSizerButtonsCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override 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(); } @@ -117,6 +118,7 @@ class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE : public DIALOG_SHIM public: DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Edit Text and Graphic Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE(); }; diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.cpp b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.cpp index 3da2e2e44e..40f7865904 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.cpp +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -92,7 +92,7 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_ bSizerTop->Add( sbFilters, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 10 ); - bMainSizer->Add( bSizerTop, 0, wxEXPAND, 5 ); + bMainSizer->Add( bSizerTop, 1, wxEXPAND, 5 ); bMainSizer->Add( 0, 0, 0, wxTOP, 5 ); @@ -290,6 +290,8 @@ DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE::DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_ m_sdbSizerButtons = new wxStdDialogButtonSizer(); m_sdbSizerButtonsOK = new wxButton( this, wxID_OK ); m_sdbSizerButtons->AddButton( m_sdbSizerButtonsOK ); + m_sdbSizerButtonsApply = new wxButton( this, wxID_APPLY ); + m_sdbSizerButtons->AddButton( m_sdbSizerButtonsApply ); m_sdbSizerButtonsCancel = new wxButton( this, wxID_CANCEL ); m_sdbSizerButtons->AddButton( m_sdbSizerButtonsCancel ); m_sdbSizerButtons->Realize(); diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.fbp b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.fbp index a1e60fd871..8f9402741a 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.fbp +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -14,6 +14,7 @@ dialog_global_edit_text_and_graphics_base 1000 none + 1 dialog_global_edit_text_and_graphics @@ -25,6 +26,7 @@ 1 1 UI + 0 0 0 @@ -50,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Edit Text and Graphic Properties + 0 @@ -2718,7 +2721,7 @@ wxALL|wxEXPAND 0 - 0 + 1 1 0 0 diff --git a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.h b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.h index 774ef9319b..c2dca3cd4d 100644 --- a/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.h +++ b/pcbnew/dialogs/dialog_global_edit_text_and_graphics_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.10.0) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -84,9 +84,10 @@ class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE : public DIALOG_SHIM wxGrid* m_grid; wxStdDialogButtonSizer* m_sdbSizerButtons; wxButton* m_sdbSizerButtonsOK; + wxButton* m_sdbSizerButtonsApply; wxButton* m_sdbSizerButtonsCancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class virtual void OnLayerFilterSelect( wxCommandEvent& event ) { event.Skip(); } virtual void OnReferenceFilterText( wxCommandEvent& event ) { event.Skip(); } virtual void OnFootprintFilterText( wxCommandEvent& event ) { event.Skip(); } @@ -99,6 +100,7 @@ class DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE : public DIALOG_SHIM public: DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Edit Text and Graphic Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS_BASE(); };