diff --git a/pcbnew/dialogs/dialog_global_deletion.cpp b/pcbnew/dialogs/dialog_global_deletion.cpp index da4c86f099..e72bb2509b 100644 --- a/pcbnew/dialogs/dialog_global_deletion.cpp +++ b/pcbnew/dialogs/dialog_global_deletion.cpp @@ -94,8 +94,19 @@ void DIALOG_GLOBAL_DELETION::onCheckDeleteFootprints( wxCommandEvent& event ) void DIALOG_GLOBAL_DELETION::onCheckDeleteDrawings( wxCommandEvent& event ) { - m_drawingFilterLocked->Enable( m_delDrawings->GetValue() ); - m_drawingFilterUnlocked->Enable( m_delDrawings->GetValue() ); + bool enable = m_delDrawings->GetValue() || m_delBoardEdges->GetValue(); + + m_drawingFilterLocked->Enable( enable ); + m_drawingFilterUnlocked->Enable( enable ); +} + + +void DIALOG_GLOBAL_DELETION::onCheckDeleteBoardOutlines( wxCommandEvent& event ) +{ + bool enable = m_delDrawings->GetValue() || m_delBoardEdges->GetValue(); + + m_drawingFilterLocked->Enable( enable ); + m_drawingFilterUnlocked->Enable( enable ); } diff --git a/pcbnew/dialogs/dialog_global_deletion.h b/pcbnew/dialogs/dialog_global_deletion.h index b79352c04b..2d0924c523 100644 --- a/pcbnew/dialogs/dialog_global_deletion.h +++ b/pcbnew/dialogs/dialog_global_deletion.h @@ -39,6 +39,7 @@ private: void onCheckDeleteTracks( wxCommandEvent& event ) override; void onCheckDeleteFootprints( wxCommandEvent& event ) override; void onCheckDeleteDrawings( wxCommandEvent& event ) override; + void onCheckDeleteBoardOutlines( wxCommandEvent& event ) override; PCB_EDIT_FRAME* m_Parent; LAYER_NUM m_currentLayer; diff --git a/pcbnew/dialogs/dialog_global_deletion_base.cpp b/pcbnew/dialogs/dialog_global_deletion_base.cpp index 5bbffaeedf..066da19f96 100644 --- a/pcbnew/dialogs/dialog_global_deletion_base.cpp +++ b/pcbnew/dialogs/dialog_global_deletion_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020) +// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -129,6 +129,7 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi this->Centre( wxBOTH ); // Connect Events + m_delBoardEdges->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteBoardOutlines ), NULL, this ); m_delDrawings->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteDrawings ), NULL, this ); m_delFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteFootprints ), NULL, this ); m_delTracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteTracks ), NULL, this ); @@ -137,6 +138,7 @@ DIALOG_GLOBAL_DELETION_BASE::DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWi DIALOG_GLOBAL_DELETION_BASE::~DIALOG_GLOBAL_DELETION_BASE() { // Disconnect Events + m_delBoardEdges->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteBoardOutlines ), NULL, this ); m_delDrawings->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteDrawings ), NULL, this ); m_delFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteFootprints ), NULL, this ); m_delTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_GLOBAL_DELETION_BASE::onCheckDeleteTracks ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_global_deletion_base.fbp b/pcbnew/dialogs/dialog_global_deletion_base.fbp index 384361b93d..d83c3a682d 100644 --- a/pcbnew/dialogs/dialog_global_deletion_base.fbp +++ b/pcbnew/dialogs/dialog_global_deletion_base.fbp @@ -1,6 +1,6 @@ - + C++ @@ -52,6 +52,7 @@ DIALOG_SHIM; dialog_shim.h Delete Items + 0 @@ -271,6 +272,7 @@ + onCheckDeleteBoardOutlines diff --git a/pcbnew/dialogs/dialog_global_deletion_base.h b/pcbnew/dialogs/dialog_global_deletion_base.h index dd4572ecfd..26de6d9c03 100644 --- a/pcbnew/dialogs/dialog_global_deletion_base.h +++ b/pcbnew/dialogs/dialog_global_deletion_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.9.0 Jun 18 2020) +// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -61,7 +61,8 @@ class DIALOG_GLOBAL_DELETION_BASE : public DIALOG_SHIM wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1Cancel; - // Virtual event handlers, overide them in your derived class + // Virtual event handlers, override them in your derived class + virtual void onCheckDeleteBoardOutlines( wxCommandEvent& event ) { event.Skip(); } virtual void onCheckDeleteDrawings( wxCommandEvent& event ) { event.Skip(); } virtual void onCheckDeleteFootprints( wxCommandEvent& event ) { event.Skip(); } virtual void onCheckDeleteTracks( wxCommandEvent& event ) { event.Skip(); } @@ -70,6 +71,7 @@ class DIALOG_GLOBAL_DELETION_BASE : public DIALOG_SHIM public: DIALOG_GLOBAL_DELETION_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Delete Items"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_GLOBAL_DELETION_BASE(); };