From 2c49c406a0fdf4c8b67258ad724231c8f31e8fae Mon Sep 17 00:00:00 2001 From: Ian McInerney Date: Wed, 30 Sep 2020 23:32:30 +0100 Subject: [PATCH] Remove ignore other projects option from back annotation The new schematic format makes this option unneeded, and it isn't used at all in the backannotation code - so it doesn't need to be in the UI. --- eeschema/dialogs/dialog_update_from_pcb.cpp | 7 +- eeschema/dialogs/dialog_update_from_pcb.h | 1 - .../dialogs/dialog_update_from_pcb_base.cpp | 7 -- .../dialogs/dialog_update_from_pcb_base.fbp | 65 ------------------- .../dialogs/dialog_update_from_pcb_base.h | 1 - eeschema/tools/backannotate.cpp | 3 +- eeschema/tools/backannotate.h | 3 +- eeschema/tools/reannotate.cpp | 1 - 8 files changed, 3 insertions(+), 85 deletions(-) diff --git a/eeschema/dialogs/dialog_update_from_pcb.cpp b/eeschema/dialogs/dialog_update_from_pcb.cpp index ce15ee5b6e..d693b3d9b4 100644 --- a/eeschema/dialogs/dialog_update_from_pcb.cpp +++ b/eeschema/dialogs/dialog_update_from_pcb.cpp @@ -30,7 +30,7 @@ // Saved dialog settings DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB_SAVED_STATE - DIALOG_UPDATE_FROM_PCB::s_savedDialogState{ true, true, true, true, false, false }; + DIALOG_UPDATE_FROM_PCB::s_savedDialogState{ true, true, true, true, false }; DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB( SCH_EDIT_FRAME* aParent ) : DIALOG_UPDATE_FROM_PCB_BASE( aParent ), @@ -58,7 +58,6 @@ DIALOG_UPDATE_FROM_PCB::DIALOG_UPDATE_FROM_PCB( SCH_EDIT_FRAME* aParent ) m_cbUpdateFootprints->SetValue( s_savedDialogState.UpdateFootprints ); m_cbUpdateValues->SetValue( s_savedDialogState.UpdateValues ); m_cbUpdateNetNames->SetValue( s_savedDialogState.UpdateNetNames ); - m_cbIgnoreOtherProjects->SetValue( s_savedDialogState.IgnoreOtherProjectsErrors ); // We use a sdbSizer to get platform-dependent ordering of the action buttons, but // that requires us to correct the button labels here. @@ -81,7 +80,6 @@ void DIALOG_UPDATE_FROM_PCB::updateData() m_cbUpdateValues->GetValue(), m_cbUpdateReferences->GetValue(), m_cbUpdateNetNames->GetValue(), - m_cbIgnoreOtherProjects->GetValue(), true ); std::string netlist; @@ -130,8 +128,6 @@ void DIALOG_UPDATE_FROM_PCB::OnOptionChanged( wxCommandEvent& event ) s_savedDialogState.UpdateValues = m_cbUpdateValues->GetValue(); else if( event.GetEventObject() == m_cbUpdateNetNames ) s_savedDialogState.UpdateNetNames = m_cbUpdateNetNames->GetValue(); - else if( event.GetEventObject() == m_cbIgnoreOtherProjects ) - s_savedDialogState.IgnoreOtherProjectsErrors = m_cbIgnoreOtherProjects->GetValue(); } void DIALOG_UPDATE_FROM_PCB::OnUpdateClick( wxCommandEvent& event ) @@ -145,7 +141,6 @@ void DIALOG_UPDATE_FROM_PCB::OnUpdateClick( wxCommandEvent& event ) m_cbUpdateValues->GetValue(), m_cbUpdateReferences->GetValue(), m_cbUpdateNetNames->GetValue(), - m_cbIgnoreOtherProjects->GetValue(), false ); if( backAnno.FetchNetlistFromPCB( netlist ) && backAnno.BackAnnotateSymbols( netlist ) ) diff --git a/eeschema/dialogs/dialog_update_from_pcb.h b/eeschema/dialogs/dialog_update_from_pcb.h index 0028a30a8f..7b4eecb965 100644 --- a/eeschema/dialogs/dialog_update_from_pcb.h +++ b/eeschema/dialogs/dialog_update_from_pcb.h @@ -45,7 +45,6 @@ class DIALOG_UPDATE_FROM_PCB : public DIALOG_UPDATE_FROM_PCB_BASE bool UpdateFootprints; bool UpdateValues; bool UpdateNetNames; - bool IgnoreOtherProjectsErrors; }; static DIALOG_UPDATE_FROM_PCB_SAVED_STATE s_savedDialogState; diff --git a/eeschema/dialogs/dialog_update_from_pcb_base.cpp b/eeschema/dialogs/dialog_update_from_pcb_base.cpp index c3de777df8..acf85354bc 100644 --- a/eeschema/dialogs/dialog_update_from_pcb_base.cpp +++ b/eeschema/dialogs/dialog_update_from_pcb_base.cpp @@ -34,11 +34,6 @@ DIALOG_UPDATE_FROM_PCB_BASE::DIALOG_UPDATE_FROM_PCB_BASE( wxWindow* parent, wxWi fgSizer1->Add( m_cbRelinkFootprints, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - m_cbIgnoreOtherProjects = new wxCheckBox( sbSizerOptions->GetStaticBox(), wxID_ANY, _("Ignore errors in shared schematic sheets"), wxDefaultPosition, wxDefaultSize, 0 ); - m_cbIgnoreOtherProjects->SetToolTip( _("Shared schematic sheets used in complex hierarchies have constraints. They are not always compatible with back annotation when updating footprints and values . \nIf this option is selected, errors generated by sharing will be disabled.") ); - - fgSizer1->Add( m_cbIgnoreOtherProjects, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - sbSizerOptions->Add( fgSizer1, 1, wxEXPAND|wxBOTTOM, 5 ); @@ -109,7 +104,6 @@ DIALOG_UPDATE_FROM_PCB_BASE::DIALOG_UPDATE_FROM_PCB_BASE( wxWindow* parent, wxWi // Connect Events m_cbRelinkFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FROM_PCB_BASE::OnOptionChanged ), NULL, this ); - m_cbIgnoreOtherProjects->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FROM_PCB_BASE::OnOptionChanged ), NULL, this ); m_cbUpdateReferences->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FROM_PCB_BASE::OnOptionChanged ), NULL, this ); m_cbUpdateFootprints->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FROM_PCB_BASE::OnOptionChanged ), NULL, this ); m_cbUpdateValues->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FROM_PCB_BASE::OnOptionChanged ), NULL, this ); @@ -121,7 +115,6 @@ DIALOG_UPDATE_FROM_PCB_BASE::~DIALOG_UPDATE_FROM_PCB_BASE() { // Disconnect Events m_cbRelinkFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FROM_PCB_BASE::OnOptionChanged ), NULL, this ); - m_cbIgnoreOtherProjects->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FROM_PCB_BASE::OnOptionChanged ), NULL, this ); m_cbUpdateReferences->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FROM_PCB_BASE::OnOptionChanged ), NULL, this ); m_cbUpdateFootprints->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FROM_PCB_BASE::OnOptionChanged ), NULL, this ); m_cbUpdateValues->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_UPDATE_FROM_PCB_BASE::OnOptionChanged ), NULL, this ); diff --git a/eeschema/dialogs/dialog_update_from_pcb_base.fbp b/eeschema/dialogs/dialog_update_from_pcb_base.fbp index 8672124d80..9f0139f7a4 100644 --- a/eeschema/dialogs/dialog_update_from_pcb_base.fbp +++ b/eeschema/dialogs/dialog_update_from_pcb_base.fbp @@ -160,71 +160,6 @@ OnOptionChanged - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Ignore errors in shared schematic sheets - - 0 - - - 0 - - 1 - m_cbIgnoreOtherProjects - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - Shared schematic sheets used in complex hierarchies have constraints. They are not always compatible with back annotation when updating footprints and values . If this option is selected, errors generated by sharing will be disabled. - - wxFILTER_NONE - wxDefaultValidator - - - - - OnOptionChanged - - diff --git a/eeschema/dialogs/dialog_update_from_pcb_base.h b/eeschema/dialogs/dialog_update_from_pcb_base.h index 11f23b64da..b92ed4bd22 100644 --- a/eeschema/dialogs/dialog_update_from_pcb_base.h +++ b/eeschema/dialogs/dialog_update_from_pcb_base.h @@ -36,7 +36,6 @@ class DIALOG_UPDATE_FROM_PCB_BASE : public DIALOG_SHIM protected: wxCheckBox* m_cbRelinkFootprints; - wxCheckBox* m_cbIgnoreOtherProjects; wxCheckBox* m_cbUpdateReferences; wxCheckBox* m_cbUpdateFootprints; wxCheckBox* m_cbUpdateValues; diff --git a/eeschema/tools/backannotate.cpp b/eeschema/tools/backannotate.cpp index 0e52499ed1..18966637e8 100644 --- a/eeschema/tools/backannotate.cpp +++ b/eeschema/tools/backannotate.cpp @@ -38,14 +38,13 @@ BACK_ANNOTATE::BACK_ANNOTATE( SCH_EDIT_FRAME* aFrame, REPORTER& aReporter, bool aRelinkFootprints, bool aProcessFootprints, bool aProcessValues, bool aProcessReferences, bool aProcessNetNames, - bool aIgnoreOtherProjects, bool aDryRun ) : + bool aDryRun ) : m_reporter( aReporter ), m_matchByReference( aRelinkFootprints ), m_processFootprints( aProcessFootprints ), m_processValues( aProcessValues ), m_processReferences( aProcessReferences ), m_processNetNames( aProcessNetNames ), - m_ignoreOtherProjects( aIgnoreOtherProjects ), m_dryRun( aDryRun ), m_frame( aFrame ), m_changesCount( 0 ), diff --git a/eeschema/tools/backannotate.h b/eeschema/tools/backannotate.h index 9509fe706f..a7700c3eab 100644 --- a/eeschema/tools/backannotate.h +++ b/eeschema/tools/backannotate.h @@ -81,7 +81,7 @@ public: BACK_ANNOTATE( SCH_EDIT_FRAME* aFrame, REPORTER& aReporter, bool aRelinkFootprints, bool aProcessFootprints, bool aProcessValues, bool aProcessReferences, - bool aProcessNetNames, bool aIgnoreOtherProjects, bool aDryRun ); + bool aProcessNetNames, bool aDryRun ); ~BACK_ANNOTATE(); /** @@ -109,7 +109,6 @@ private: bool m_processValues; bool m_processReferences; bool m_processNetNames; - bool m_ignoreOtherProjects; bool m_dryRun; PCB_MODULES_MAP m_pcbModules; diff --git a/eeschema/tools/reannotate.cpp b/eeschema/tools/reannotate.cpp index ffb2767679..0ce7e9d848 100644 --- a/eeschema/tools/reannotate.cpp +++ b/eeschema/tools/reannotate.cpp @@ -67,7 +67,6 @@ void ReannotateFromPCBNew( SCH_EDIT_FRAME* aFrame, std::string& aNetlist ) false, //aProcessValues true, //aProcessReferences false, //aProcessNetNames - false, //aIgnoreOtherProjects false ); //aDryRun if( !backAnno.BackAnnotateSymbols( aNetlist ) )