From 0dcc34ddc818f1a4a033eb77a74321d4b3c67302 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Thu, 26 Jan 2023 13:34:21 +0000 Subject: [PATCH] Simplify Remove Unused Pads dialog. --- .../dialogs/dialog_configure_paths_base.fbp | 462 ++++++++++-------- pcbnew/dialogs/dialog_unused_pad_layers.cpp | 33 +- pcbnew/dialogs/dialog_unused_pad_layers.h | 2 +- .../dialogs/dialog_unused_pad_layers_base.cpp | 47 +- .../dialogs/dialog_unused_pad_layers_base.fbp | 269 ++++------ .../dialogs/dialog_unused_pad_layers_base.h | 7 +- 6 files changed, 388 insertions(+), 432 deletions(-) diff --git a/common/dialogs/dialog_configure_paths_base.fbp b/common/dialogs/dialog_configure_paths_base.fbp index 2f0818e41e..dc419b0d35 100644 --- a/common/dialogs/dialog_configure_paths_base.fbp +++ b/common/dialogs/dialog_configure_paths_base.fbp @@ -63,22 +63,108 @@ wxVERTICAL none - 5 - wxEXPAND|wxALL + 10 + wxEXPAND|wxTOP 1 - + + 1 + 1 + 1 + 1 + + + + + 0 + 0 + + + + 1 + + + wxALIGN_LEFT + + wxALIGN_TOP + 0 + 1 + wxALIGN_CENTER + wxGRID_AUTOSIZE + "Environment Variables" "Path" "" + wxALIGN_CENTER + 2 + 150,454 + + 1 + 0 + Dock + 0 + Left + 0 + 1 + 0 + 1 + 1 + 1 + + 1 + + + 1 + 0 + 0 wxID_ANY - Environment Variables + + + + 0 + 0 + + 0 + + + 0 + 604,170 + 1 + m_EnvVars + 1 + + + protected + 1 + + Resizable + wxALIGN_CENTER + 0 + + wxALIGN_CENTER + + 1 + 1 + + WX_GRID; widgets/wx_grid.h; forward_declare + 0 + + + + + OnGridSize + + + + 5 + wxEXPAND|wxTOP + 0 + - sbEnvVars - wxVERTICAL - 1 + bSizerEnvVarBtns + wxHORIZONTAL none 5 - wxALL|wxEXPAND - 1 - + wxBOTTOM|wxLEFT + 0 + 1 1 1 @@ -87,251 +173,209 @@ - 0 - 0 + 0 + 1 - - - wxALIGN_LEFT - - wxALIGN_TOP 0 1 - wxALIGN_CENTER - wxGRID_AUTOSIZE - "Name" "Path" - wxALIGN_CENTER - 2 - 150,454 1 + + 0 0 + Dock 0 Left - 0 - 1 - 0 - 1 - 1 1 1 + - - 1 0 0 wxID_ANY - - - - 0 - 0 + Add Environment Variable + + 0 0 0 - 604,170 + -1,-1 1 - m_EnvVars + m_btnAddEnvVar 1 protected 1 + + Resizable - wxALIGN_CENTER - 0 - - wxALIGN_CENTER - - 1 1 - WX_GRID; widgets/wx_grid.h; forward_declare + + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare 0 + + wxFILTER_NONE + wxDefaultValidator + - OnGridSize + OnAddEnvVar 5 - wxEXPAND + wxEXPAND|wxRIGHT|wxLEFT 0 - - - bSizerEnvVarBtns - wxHORIZONTAL - none - - 5 - wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Add Environment Variable - - 0 - - 0 - - - 0 - -1,-1 - 1 - m_btnAddEnvVar - 1 - - - protected - 1 - - - - Resizable - 1 - - - STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnAddEnvVar - - - - 5 - wxEXPAND|wxRIGHT|wxLEFT - 0 - - 0 - protected - 0 - - - - 5 - wxBOTTOM - 0 - - 1 - 1 - 1 - 1 - - - - - 0 - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - Delete Environment Variable - - 0 - - 0 - - - 0 - -1,-1 - 1 - m_btnDeleteEnvVar - 1 - - - protected - 1 - - - - Resizable - 1 - - - STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnRemoveEnvVar - - + + 0 + protected + 0 + + 5 + wxBOTTOM + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Delete Environment Variable + + 0 + + 0 + + + 0 + -1,-1 + 1 + m_btnDeleteEnvVar + 1 + + + protected + 1 + + + + Resizable + 1 + + + STD_BITMAP_BUTTON; widgets/std_bitmap_button.h; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnRemoveEnvVar + + + + + + 5 + wxEXPAND|wxTOP + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + ; ; forward_declare + 0 + + + + diff --git a/pcbnew/dialogs/dialog_unused_pad_layers.cpp b/pcbnew/dialogs/dialog_unused_pad_layers.cpp index c7dadd3635..8966fae579 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 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2020-2023 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 @@ -33,13 +33,6 @@ #include -enum PAD_ACTION : int -{ - PAD_ACTION_REMOVE = 0, - PAD_ACTION_RESET -}; - - DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS( PCB_BASE_FRAME* aParent, const PCB_SELECTION& aItems, COMMIT& aCommit ) @@ -55,7 +48,9 @@ DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS( PCB_BASE_FRAME* aParent, // is probably not frequent m_cbPreservePads->SetValue( true ); - SetupStandardButtons(); + SetupStandardButtons( { { wxID_OK, _( "Remove Unused Layers" ) }, + { wxID_APPLY, _( "Restore All Layers" ) }, + { wxID_CANCEL, _( "Cancel" ) } } ); updateImage(); @@ -66,9 +61,7 @@ DIALOG_UNUSED_PAD_LAYERS::DIALOG_UNUSED_PAD_LAYERS( PCB_BASE_FRAME* aParent, void DIALOG_UNUSED_PAD_LAYERS::updateImage() { - if( m_rbAction->GetSelection() == PAD_ACTION_RESET ) - m_image->SetBitmap( KiBitmap( BITMAPS::pads_reset_unused ) ); - else if( m_cbPreservePads->IsChecked() ) + if( m_cbPreservePads->IsChecked() ) m_image->SetBitmap( KiBitmap( BITMAPS::pads_remove_unused_keep_bottom ) ); else m_image->SetBitmap( KiBitmap( BITMAPS::pads_remove_unused ) ); @@ -81,6 +74,12 @@ void DIALOG_UNUSED_PAD_LAYERS::syncImages( wxCommandEvent& aEvent ) } +void DIALOG_UNUSED_PAD_LAYERS::onApply( wxCommandEvent& event ) +{ + EndModal( wxID_APPLY ); +} + + bool DIALOG_UNUSED_PAD_LAYERS::TransferDataFromWindow() { if( m_cbSelectedOnly->IsChecked() ) @@ -92,7 +91,7 @@ bool DIALOG_UNUSED_PAD_LAYERS::TransferDataFromWindow() if( item->Type() == PCB_VIA_T && m_cbVias->IsChecked() ) { PCB_VIA* via = static_cast( item ); - via->SetRemoveUnconnected( m_rbAction->GetSelection() == PAD_ACTION_REMOVE ); + via->SetRemoveUnconnected( GetReturnCode() == wxID_OK ); via->SetKeepStartEnd( m_cbPreservePads->IsChecked() ); } @@ -102,7 +101,7 @@ bool DIALOG_UNUSED_PAD_LAYERS::TransferDataFromWindow() for( PAD* pad : footprint->Pads() ) { - pad->SetRemoveUnconnected( m_rbAction->GetSelection() == PAD_ACTION_REMOVE ); + pad->SetRemoveUnconnected( GetReturnCode() == wxID_OK ); pad->SetKeepTopBottom( m_cbPreservePads->IsChecked() ); } } @@ -111,7 +110,7 @@ bool DIALOG_UNUSED_PAD_LAYERS::TransferDataFromWindow() { PAD* pad = static_cast( item ); - pad->SetRemoveUnconnected( m_rbAction->GetSelection() == PAD_ACTION_REMOVE ); + pad->SetRemoveUnconnected( GetReturnCode() == wxID_OK ); pad->SetKeepTopBottom( m_cbPreservePads->IsChecked() ); } } @@ -126,7 +125,7 @@ bool DIALOG_UNUSED_PAD_LAYERS::TransferDataFromWindow() for( PAD* pad : footprint->Pads() ) { - pad->SetRemoveUnconnected( m_rbAction->GetSelection() == PAD_ACTION_REMOVE ); + pad->SetRemoveUnconnected( GetReturnCode() == wxID_OK ); pad->SetKeepTopBottom( m_cbPreservePads->IsChecked() ); } } @@ -141,7 +140,7 @@ bool DIALOG_UNUSED_PAD_LAYERS::TransferDataFromWindow() m_commit.Modify( item ); PCB_VIA* via = static_cast( item ); - via->SetRemoveUnconnected( m_rbAction->GetSelection() == PAD_ACTION_REMOVE ); + via->SetRemoveUnconnected( GetReturnCode() == wxID_OK ); via->SetKeepStartEnd( m_cbPreservePads->IsChecked() ); } } diff --git a/pcbnew/dialogs/dialog_unused_pad_layers.h b/pcbnew/dialogs/dialog_unused_pad_layers.h index 4c5e5d45eb..e3c38b94ca 100644 --- a/pcbnew/dialogs/dialog_unused_pad_layers.h +++ b/pcbnew/dialogs/dialog_unused_pad_layers.h @@ -41,9 +41,9 @@ public: private: bool TransferDataFromWindow() override; - bool AcceptOptions(); void updateImage(); + void onApply( wxCommandEvent& event ) override; void syncImages( wxCommandEvent& aEvent ) override; diff --git a/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp b/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp index 15942f42c1..05231dc044 100644 --- a/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp +++ b/pcbnew/dialogs/dialog_unused_pad_layers_base.cpp @@ -15,40 +15,29 @@ DIALOG_UNUSED_PAD_LAYERS_BASE::DIALOG_UNUSED_PAD_LAYERS_BASE( wxWindow* parent, m_MainSizer = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer2; - bSizer2 = new wxBoxSizer( wxHORIZONTAL ); + wxBoxSizer* bMargins; + bMargins = new wxBoxSizer( wxHORIZONTAL ); - wxFlexGridSizer* fgSizerProps; - fgSizerProps = new wxFlexGridSizer( 0, 2, 0, 5 ); - fgSizerProps->SetFlexibleDirection( wxVERTICAL ); - fgSizerProps->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); + wxBoxSizer* bSizer4; + bSizer4 = new wxBoxSizer( wxVERTICAL ); - wxStaticBoxSizer* sbSizerScope; - sbSizerScope = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Scope") ), wxVERTICAL ); + m_cbVias = new wxCheckBox( this, wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_cbVias, 0, wxALL, 5 ); - m_cbVias = new wxCheckBox( sbSizerScope->GetStaticBox(), wxID_ANY, _("Vias"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerScope->Add( m_cbVias, 0, wxALL, 5 ); - - m_cbPads = new wxCheckBox( sbSizerScope->GetStaticBox(), wxID_ANY, _("Pads"), wxDefaultPosition, wxDefaultSize, 0 ); - sbSizerScope->Add( m_cbPads, 0, wxALL, 5 ); + m_cbPads = new wxCheckBox( this, wxID_ANY, _("Pads"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer4->Add( m_cbPads, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - fgSizerProps->Add( sbSizerScope, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 ); + bSizer4->Add( 0, 15, 1, wxEXPAND, 5 ); - wxString m_rbActionChoices[] = { _("&Remove unused layers"), _("Res&tore unused layers") }; - int m_rbActionNChoices = sizeof( m_rbActionChoices ) / sizeof( wxString ); - m_rbAction = new wxRadioBox( this, wxID_ANY, _("Action"), wxDefaultPosition, wxDefaultSize, m_rbActionNChoices, m_rbActionChoices, 1, wxRA_SPECIFY_COLS ); - m_rbAction->SetSelection( 1 ); - fgSizerProps->Add( m_rbAction, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); - - m_cbSelectedOnly = new wxCheckBox( this, wxID_ANY, _("&Selection only"), wxDefaultPosition, wxDefaultSize, 0 ); - fgSizerProps->Add( m_cbSelectedOnly, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + 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 ); - fgSizerProps->Add( m_cbPreservePads, 0, wxEXPAND|wxLEFT|wxTOP, 5 ); + bSizer4->Add( m_cbPreservePads, 0, wxEXPAND|wxLEFT, 5 ); - bSizer2->Add( fgSizerProps, 0, wxEXPAND|wxALL, 5 ); + bMargins->Add( bSizer4, 1, wxEXPAND|wxTOP|wxLEFT, 10 ); wxBoxSizer* bSizerPreview; bSizerPreview = new wxBoxSizer( wxVERTICAL ); @@ -63,14 +52,16 @@ DIALOG_UNUSED_PAD_LAYERS_BASE::DIALOG_UNUSED_PAD_LAYERS_BASE( wxWindow* parent, bSizerPreview->Add( 0, 0, 0, wxEXPAND, 5 ); - bSizer2->Add( bSizerPreview, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 ); + bMargins->Add( bSizerPreview, 1, wxEXPAND|wxLEFT|wxRIGHT, 5 ); - m_MainSizer->Add( bSizer2, 6, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); + m_MainSizer->Add( bMargins, 6, wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT, 5 ); m_StdButtons = new wxStdDialogButtonSizer(); m_StdButtonsOK = new wxButton( this, wxID_OK ); m_StdButtons->AddButton( m_StdButtonsOK ); + m_StdButtonsApply = new wxButton( this, wxID_APPLY ); + m_StdButtons->AddButton( m_StdButtonsApply ); m_StdButtonsCancel = new wxButton( this, wxID_CANCEL ); m_StdButtons->AddButton( m_StdButtonsCancel ); m_StdButtons->Realize(); @@ -87,8 +78,8 @@ 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_rbAction->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, 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_StdButtonsApply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::onApply ), NULL, this ); } DIALOG_UNUSED_PAD_LAYERS_BASE::~DIALOG_UNUSED_PAD_LAYERS_BASE() @@ -96,7 +87,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_rbAction->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, 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_StdButtonsApply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_UNUSED_PAD_LAYERS_BASE::onApply ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_unused_pad_layers_base.fbp b/pcbnew/dialogs/dialog_unused_pad_layers_base.fbp index 943cdfaece..2925d45173 100644 --- a/pcbnew/dialogs/dialog_unused_pad_layers_base.fbp +++ b/pcbnew/dialogs/dialog_unused_pad_layers_base.fbp @@ -50,7 +50,7 @@ -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h - Remove Unused Pads + Unused Pads 0 @@ -67,174 +67,23 @@ 6 - bSizer2 + bMargins wxHORIZONTAL none - 5 - wxEXPAND|wxALL - 0 - - 2 - wxVERTICAL - - - 5 + 10 + wxEXPAND|wxTOP|wxLEFT + 1 + - fgSizerProps - wxFLEX_GROWMODE_SPECIFIED + bSizer4 + wxVERTICAL none - 0 - 0 5 - wxEXPAND|wxALIGN_CENTER_VERTICAL - 1 - - wxID_ANY - Scope - - sbSizerScope - wxVERTICAL - 1 - 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 - wxALL - 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 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT|wxTOP - 1 - + wxALL + 0 + 1 1 1 @@ -248,7 +97,7 @@ 1 0 - "&Remove unused layers" "Res&tore unused layers" + 0 1 1 @@ -263,8 +112,7 @@ 0 0 wxID_ANY - Action - 1 + Vias 0 @@ -272,7 +120,7 @@ 0 1 - m_rbAction + m_cbVias 1 @@ -280,10 +128,9 @@ 1 Resizable - 1 1 - wxRA_SPECIFY_COLS + ; ; forward_declare 0 @@ -294,12 +141,87 @@ - syncImages + 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 + 1 + + 15 + protected + 0 5 - wxEXPAND|wxLEFT|wxTOP + wxEXPAND|wxBOTTOM|wxLEFT 0 1 @@ -330,7 +252,7 @@ 0 0 wxID_ANY - &Selection only + &Selected only 0 @@ -363,7 +285,7 @@ 5 - wxEXPAND|wxLEFT|wxTOP + wxEXPAND|wxLEFT 0 1 @@ -524,7 +446,7 @@ wxBOTTOM|wxEXPAND|wxTOP 0 - 0 + 1 1 0 0 @@ -535,6 +457,7 @@ m_StdButtons protected + onApply diff --git a/pcbnew/dialogs/dialog_unused_pad_layers_base.h b/pcbnew/dialogs/dialog_unused_pad_layers_base.h index 6d88481b73..c64f1a5cfc 100644 --- a/pcbnew/dialogs/dialog_unused_pad_layers_base.h +++ b/pcbnew/dialogs/dialog_unused_pad_layers_base.h @@ -18,8 +18,6 @@ #include #include #include -#include -#include #include #include #include @@ -41,21 +39,22 @@ class DIALOG_UNUSED_PAD_LAYERS_BASE : public DIALOG_SHIM wxBoxSizer* m_MainSizer; wxCheckBox* m_cbVias; wxCheckBox* m_cbPads; - wxRadioBox* m_rbAction; wxCheckBox* m_cbSelectedOnly; wxCheckBox* m_cbPreservePads; wxStaticBitmap* m_image; wxStdDialogButtonSizer* m_StdButtons; wxButton* m_StdButtonsOK; + wxButton* m_StdButtonsApply; wxButton* m_StdButtonsCancel; // Virtual event handlers, override them in your derived class virtual void syncImages( wxCommandEvent& event ) { event.Skip(); } + virtual void onApply( wxCommandEvent& event ) { event.Skip(); } public: - DIALOG_UNUSED_PAD_LAYERS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Remove Unused Pads"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_UNUSED_PAD_LAYERS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Unused Pads"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_UNUSED_PAD_LAYERS_BASE();