diff --git a/pcbnew/dialogs/dialog_unused_pad_layers.cpp b/pcbnew/dialogs/dialog_unused_pad_layers.cpp index c891cdaf13..e43bb931fd 100644 --- a/pcbnew/dialogs/dialog_unused_pad_layers.cpp +++ b/pcbnew/dialogs/dialog_unused_pad_layers.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * Copyright (C) 2020 CERN - * Copyright (C) 2020-2023 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2024 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -46,7 +46,7 @@ DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS( PCB_BASE_FRAME* aParent, // Set keep Through Hole pads on external layers ON by default. // Because such a pad does not allow soldering/unsoldering, disable this option // is probably not frequent - m_cbPreservePads->SetValue( true ); + m_cbPreserveExternalLayers->SetValue( true ); SetupStandardButtons( { { wxID_OK, _( "Remove Unused Layers" ) }, { wxID_APPLY, _( "Restore All Layers" ) }, @@ -61,7 +61,7 @@ DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS( PCB_BASE_FRAME* aParent, void DIALOG_UNUSED_PAD_LAYERS::updateImage() { - if( m_cbPreservePads->IsChecked() ) + if( m_cbPreserveExternalLayers->IsChecked() ) m_image->SetBitmap( KiBitmapBundle( BITMAPS::pads_remove_unused_keep_bottom ) ); else m_image->SetBitmap( KiBitmapBundle( BITMAPS::pads_remove_unused ) ); @@ -124,7 +124,9 @@ void DIALOG_UNUSED_PAD_LAYERS::updatePadsAndVias( bool aRemoveLayers ) if( viaHasPotentiallyUnusedLayers( via ) ) { via->SetRemoveUnconnected( aRemoveLayers ); - via->SetKeepStartEnd( m_cbPreservePads->IsChecked() ); + + if( aRemoveLayers ) + via->SetKeepStartEnd( m_cbPreserveExternalLayers->IsChecked() ); } } @@ -137,7 +139,9 @@ void DIALOG_UNUSED_PAD_LAYERS::updatePadsAndVias( bool aRemoveLayers ) if( padHasPotentiallyUnusedLayers( pad ) ) { pad->SetRemoveUnconnected( aRemoveLayers ); - pad->SetKeepTopBottom( m_cbPreservePads->IsChecked() ); + + if( aRemoveLayers ) + pad->SetKeepTopBottom( m_cbPreserveExternalLayers->IsChecked() ); } } } @@ -149,7 +153,9 @@ void DIALOG_UNUSED_PAD_LAYERS::updatePadsAndVias( bool aRemoveLayers ) if( padHasPotentiallyUnusedLayers( pad ) ) { pad->SetRemoveUnconnected( aRemoveLayers ); - pad->SetKeepTopBottom( m_cbPreservePads->IsChecked() ); + + if( aRemoveLayers ) + pad->SetKeepTopBottom( m_cbPreserveExternalLayers->IsChecked() ); } } } @@ -167,7 +173,9 @@ void DIALOG_UNUSED_PAD_LAYERS::updatePadsAndVias( bool aRemoveLayers ) if( padHasPotentiallyUnusedLayers( pad ) ) { pad->SetRemoveUnconnected( aRemoveLayers ); - pad->SetKeepTopBottom( m_cbPreservePads->IsChecked() ); + + if( aRemoveLayers ) + pad->SetKeepTopBottom( m_cbPreserveExternalLayers->IsChecked() ); } } } @@ -186,7 +194,9 @@ void DIALOG_UNUSED_PAD_LAYERS::updatePadsAndVias( bool aRemoveLayers ) { m_commit.Modify( via ); via->SetRemoveUnconnected( aRemoveLayers ); - via->SetKeepStartEnd( m_cbPreservePads->IsChecked() ); + + if( aRemoveLayers ) + via->SetKeepStartEnd( m_cbPreserveExternalLayers->IsChecked() ); } } } diff --git a/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp b/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp index 14feff5086..7110e37662 100644 --- a/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp +++ b/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -33,8 +33,8 @@ DIALOG_UNUSED_PAD_LAYERS_BASE::DIALOG_UNUSED_PAD_LAYERS_BASE( wxWindow* parent, m_cbSelectedOnly = new wxCheckBox( this, wxID_ANY, _("&Selected only"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer4->Add( m_cbSelectedOnly, 0, wxEXPAND|wxBOTTOM|wxLEFT, 5 ); - m_cbPreservePads = new wxCheckBox( this, wxID_ANY, _("Keep &outside layers"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer4->Add( m_cbPreservePads, 0, wxEXPAND|wxLEFT, 5 ); + m_cbPreserveExternalLayers = new wxCheckBox( this, wxID_ANY, _("Keep &outside layers"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_cbPreserveExternalLayers, 0, wxEXPAND|wxLEFT, 5 ); bMargins->Add( bSizer4, 1, wxEXPAND|wxTOP|wxLEFT, 10 ); @@ -78,7 +78,7 @@ DIALOG_UNUSED_PAD_LAYERS_BASE::DIALOG_UNUSED_PAD_LAYERS_BASE( wxWindow* parent, // Connect Events m_cbVias->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::syncImages ), NULL, this ); m_cbPads->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::syncImages ), NULL, this ); - m_cbPreservePads->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::syncImages ), NULL, this ); + m_cbPreserveExternalLayers->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::syncImages ), NULL, this ); m_StdButtonsApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::onApply ), NULL, this ); m_StdButtonsOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::onOK ), NULL, this ); } @@ -88,7 +88,7 @@ DIALOG_UNUSED_PAD_LAYERS_BASE::~DIALOG_UNUSED_PAD_LAYERS_BASE() // Disconnect Events m_cbVias->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::syncImages ), NULL, this ); m_cbPads->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::syncImages ), NULL, this ); - m_cbPreservePads->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::syncImages ), NULL, this ); + m_cbPreserveExternalLayers->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::syncImages ), NULL, this ); m_StdButtonsApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::onApply ), NULL, this ); m_StdButtonsOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::onOK ), NULL, this ); diff --git a/pcbnew/dialogs/dialog_unused_pad_layers_base.fbp b/pcbnew/dialogs/dialog_unused_pad_layers_base.fbp index 8dc9491f68..dc1e0bd6fe 100644 --- a/pcbnew/dialogs/dialog_unused_pad_layers_base.fbp +++ b/pcbnew/dialogs/dialog_unused_pad_layers_base.fbp @@ -1,467 +1,475 @@ - + - - - - C++ - 1 - source_name - 0 - 0 - res - UTF-8 - connect - dialog_unused_pad_layers_base - 1000 - none - - - 1 - DIALOG_UNUSED_PAD_LAYERS_BASE - - . - - 1 - 1 - 1 - 1 - UI - 0 - 0 - 0 - - 0 - wxAUI_MGR_DEFAULT - - wxBOTH - - 1 - 1 - impl_virtual - - - - 0 - wxID_ANY - - -1,-1 - DIALOG_UNUSED_PAD_LAYERS_BASE - - -1,-1 - wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - DIALOG_SHIM; dialog_shim.h - Unused Pads - - 0 - - - - + + + C++ + + 1 + connect + none + + + 0 + 0 + res + UTF-8 + dialog_unused_pad_layers_base + 1000 + 1 + 1 + UI + DIALOG_UNUSED_PAD_LAYERS_BASE + . + 0 + source_name + 1 + 0 + source_name + + + 1 + 1 + 0 + 0 + + 0 + wxAUI_MGR_DEFAULT + + wxBOTH + + 1 + 0 + 1 + impl_virtual + + + + 0 + wxID_ANY + + -1,-1 + DIALOG_UNUSED_PAD_LAYERS_BASE + + -1,-1 + wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER + DIALOG_SHIM; dialog_shim.h + Unused Pads + + 0 + + + + + + m_MainSizer + wxVERTICAL + protected + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 6 + + + bMargins + wxHORIZONTAL + none + + 10 + wxEXPAND|wxTOP|wxLEFT + 1 + - m_MainSizer + bSizer4 wxVERTICAL - protected - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 6 - - - bMargins - wxHORIZONTAL - none - - 10 - wxEXPAND|wxTOP|wxLEFT - 1 - - - bSizer4 - wxVERTICAL - none - - 5 - wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Vias - - 0 - - - 0 - - 1 - m_cbVias - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - syncImages - - - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Pads - - 0 - - - 0 - - 1 - m_cbPads - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - syncImages - - - - 5 - wxEXPAND - 0 - - 15 - protected - 0 - - - - 5 - wxEXPAND|wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - &Selected only - - 0 - - - 0 - - 1 - m_cbSelectedOnly - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - 5 - wxEXPAND|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Keep &outside layers - - 0 - - - 0 - - 1 - m_cbPreservePads - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - syncImages - - - - - - 5 - wxEXPAND|wxLEFT|wxRIGHT - 1 - - - bSizerPreview - wxVERTICAL - none - - 5 - wxEXPAND - 0 - - 0 - protected - 0 - - - - 10 - wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - Load From Resource; - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_image - 1 - - - protected - 1 - - Resizable - 1 - - ; ; forward_declare - 0 - - - - - - - - 5 - wxEXPAND - 0 - - 0 - protected - 0 - - - - - + none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Vias + + 0 + + + 0 + + 1 + m_cbVias + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + syncImages + - - 5 - wxBOTTOM|wxEXPAND|wxTOP - 0 - - 1 - 1 - 0 - 0 - 0 - 1 - 0 - 0 - - m_StdButtons - protected - onApply - onOK - + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Pads + + 0 + + + 0 + + 1 + m_cbPads + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + syncImages + + + 5 + wxEXPAND + 0 + + 15 + protected + 0 + + + + 5 + wxEXPAND|wxBOTTOM|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + &Selected only + + 0 + + + 0 + + 1 + m_cbSelectedOnly + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + 5 + wxEXPAND|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + Keep &outside layers + + 0 + + + 0 + + 1 + m_cbPreserveExternalLayers + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + syncImages + + + + + 5 + wxEXPAND|wxLEFT|wxRIGHT + 1 + + + bSizerPreview + wxVERTICAL + none + + 5 + wxEXPAND + 0 + + 0 + protected + 0 + + + + 10 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + 0 + + 0 + 0 + + + Load From Resource; + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_image + 1 + + + protected + 1 + + Resizable + 1 + + ; ; forward_declare + 0 + + + + + + + + 5 + wxEXPAND + 0 + + 0 + protected + 0 + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxTOP + 0 + + 1 + 1 + 0 + 0 + 0 + 1 + 0 + 0 + + m_StdButtons + protected + onApply + onOK + + + + diff --git a/pcbnew/dialogs/dialog_unused_pad_layers_base.h b/pcbnew/dialogs/dialog_unused_pad_layers_base.h index 0a34e6b4ea..a07ab7ed6a 100644 --- a/pcbnew/dialogs/dialog_unused_pad_layers_base.h +++ b/pcbnew/dialogs/dialog_unused_pad_layers_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version 3.10.0-39-g3487c3cb) +// C++ code generated with wxFormBuilder (version 4.2.1-0-g80c4cb6) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -27,7 +27,6 @@ /////////////////////////////////////////////////////////////////////////// - /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_UNUSED_PAD_LAYERS_BASE /////////////////////////////////////////////////////////////////////////////// @@ -40,7 +39,7 @@ class DIALOG_UNUSED_PAD_LAYERS_BASE : public DIALOG_SHIM wxCheckBox* m_cbVias; wxCheckBox* m_cbPads; wxCheckBox* m_cbSelectedOnly; - wxCheckBox* m_cbPreservePads; + wxCheckBox* m_cbPreserveExternalLayers; wxStaticBitmap* m_image; wxStdDialogButtonSizer* m_StdButtons; wxButton* m_StdButtonsOK;