From a6263fc59509c4ddacfe1db858a60453030e9932 Mon Sep 17 00:00:00 2001 From: Seth Hillbrand Date: Mon, 22 Feb 2021 09:15:31 -0800 Subject: [PATCH] Remove superfluous "Rebuild Ratsnest" button This happens when clicking OK already and there is nothing to change before then. --- pcbnew/dialogs/dialog_netlist.cpp | 9 --------- pcbnew/dialogs/dialog_netlist.h | 1 - pcbnew/dialogs/dialog_netlist_base.cpp | 8 +------- pcbnew/dialogs/dialog_netlist_base.fbp | 6 ++++-- pcbnew/dialogs/dialog_netlist_base.h | 7 ++----- 5 files changed, 7 insertions(+), 24 deletions(-) diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index 4dade2396d..2bd21a5b21 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -84,7 +84,6 @@ DIALOG_NETLIST::DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxString& aNetlistFullF // We use a sdbSizer to get platform-dependent ordering of the action buttons, but // that requires us to correct the button labels here. m_sdbSizer1OK->SetLabel( _( "Update PCB" ) ); - m_sdbSizer1Apply->SetLabel( _( "Rebuild Ratsnest" ) ); m_sdbSizer1Cancel->SetLabel( _( "Close" ) ); m_buttonsSizer->Layout(); @@ -208,14 +207,6 @@ void DIALOG_NETLIST::OnOptionChanged( wxCommandEvent& event ) } -void DIALOG_NETLIST::OnCompileRatsnestClick( wxCommandEvent& event ) -{ - // Rebuild the board connectivity: - auto board = m_parent->GetBoard(); - board->GetConnectivity()->RecalculateRatsnest(); -} - - void DIALOG_NETLIST::loadNetlist( bool aDryRun ) { wxString netlistFileName = m_NetlistFilenameCtrl->GetValue(); diff --git a/pcbnew/dialogs/dialog_netlist.h b/pcbnew/dialogs/dialog_netlist.h index 9fa129987b..9950d15d93 100644 --- a/pcbnew/dialogs/dialog_netlist.h +++ b/pcbnew/dialogs/dialog_netlist.h @@ -64,7 +64,6 @@ private: void OnFilenameKillFocus( wxFocusEvent& event ) override; void OnMatchChanged( wxCommandEvent& event ) override; void OnOptionChanged( wxCommandEvent& event ) override; - void OnCompileRatsnestClick( wxCommandEvent& event ) override; }; diff --git a/pcbnew/dialogs/dialog_netlist_base.cpp b/pcbnew/dialogs/dialog_netlist_base.cpp index a9e57c4492..b340f9e66a 100644 --- a/pcbnew/dialogs/dialog_netlist_base.cpp +++ b/pcbnew/dialogs/dialog_netlist_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -89,8 +89,6 @@ DIALOG_NETLIST_BASE::DIALOG_NETLIST_BASE( wxWindow* parent, wxWindowID id, const m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1OK = new wxButton( this, wxID_OK ); m_sdbSizer1->AddButton( m_sdbSizer1OK ); - m_sdbSizer1Apply = new wxButton( this, wxID_APPLY ); - m_sdbSizer1->AddButton( m_sdbSizer1Apply ); m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL ); m_sdbSizer1->AddButton( m_sdbSizer1Cancel ); m_sdbSizer1->Realize(); @@ -106,7 +104,6 @@ DIALOG_NETLIST_BASE::DIALOG_NETLIST_BASE( wxWindow* parent, wxWindowID id, const bMainSizer->Fit( this ); // Connect Events - this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_BASE::OnUpdateUIValidNetlistFile ) ); m_NetlistFilenameCtrl->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_NETLIST_BASE::OnFilenameKillFocus ), NULL, this ); m_browseButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOpenNetlistClick ), NULL, this ); m_matchByTimestamp->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnMatchChanged ), NULL, this ); @@ -115,14 +112,12 @@ DIALOG_NETLIST_BASE::DIALOG_NETLIST_BASE( wxWindow* parent, wxWindowID id, const m_cbDeleteShortingTracks->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOptionChanged ), NULL, this ); m_cbDeleteSinglePadNets->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOptionChanged ), NULL, this ); m_cbWarnNoNetPad->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOptionChanged ), NULL, this ); - m_sdbSizer1Apply->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnCompileRatsnestClick ), NULL, this ); m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnUpdatePCB ), NULL, this ); } DIALOG_NETLIST_BASE::~DIALOG_NETLIST_BASE() { // Disconnect Events - this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_BASE::OnUpdateUIValidNetlistFile ) ); m_NetlistFilenameCtrl->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( DIALOG_NETLIST_BASE::OnFilenameKillFocus ), NULL, this ); m_browseButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOpenNetlistClick ), NULL, this ); m_matchByTimestamp->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnMatchChanged ), NULL, this ); @@ -131,7 +126,6 @@ DIALOG_NETLIST_BASE::~DIALOG_NETLIST_BASE() m_cbDeleteShortingTracks->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOptionChanged ), NULL, this ); m_cbDeleteSinglePadNets->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOptionChanged ), NULL, this ); m_cbWarnNoNetPad->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnOptionChanged ), NULL, this ); - m_sdbSizer1Apply->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnCompileRatsnestClick ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_BASE::OnUpdatePCB ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_netlist_base.fbp b/pcbnew/dialogs/dialog_netlist_base.fbp index 96553db947..ee6dec9498 100644 --- a/pcbnew/dialogs/dialog_netlist_base.fbp +++ b/pcbnew/dialogs/dialog_netlist_base.fbp @@ -14,6 +14,7 @@ dialog_netlist_base 1000 none + 1 dialog_netlist_base @@ -25,6 +26,7 @@ 1 1 UI + 0 1 0 @@ -206,6 +208,7 @@ + 0 @@ -767,7 +770,7 @@ wxEXPAND 1 - 1 + 0 1 0 0 @@ -778,7 +781,6 @@ m_sdbSizer1 protected - OnCompileRatsnestClick OnUpdatePCB diff --git a/pcbnew/dialogs/dialog_netlist_base.h b/pcbnew/dialogs/dialog_netlist_base.h index c7e93193bb..cbca2e3b77 100644 --- a/pcbnew/dialogs/dialog_netlist_base.h +++ b/pcbnew/dialogs/dialog_netlist_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 26 2018) +// C++ code generated with wxFormBuilder (version 3.9.0 Dec 30 2020) // http://www.wxformbuilder.org/ // // PLEASE DO *NOT* EDIT THIS FILE! @@ -54,16 +54,13 @@ class DIALOG_NETLIST_BASE : public DIALOG_SHIM wxBoxSizer* m_buttonsSizer; wxStdDialogButtonSizer* m_sdbSizer1; wxButton* m_sdbSizer1OK; - wxButton* m_sdbSizer1Apply; wxButton* m_sdbSizer1Cancel; - // Virtual event handlers, overide them in your derived class - virtual void OnUpdateUIValidNetlistFile( wxUpdateUIEvent& event ) { event.Skip(); } + // Virtual event handlers, override them in your derived class virtual void OnFilenameKillFocus( wxFocusEvent& event ) { event.Skip(); } virtual void OnOpenNetlistClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnMatchChanged( wxCommandEvent& event ) { event.Skip(); } virtual void OnOptionChanged( wxCommandEvent& event ) { event.Skip(); } - virtual void OnCompileRatsnestClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnUpdatePCB( wxCommandEvent& event ) { event.Skip(); }