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.
This commit is contained in:
Ian McInerney 2020-09-30 23:32:30 +01:00
parent f1ebb64e51
commit 2c49c406a0
8 changed files with 3 additions and 85 deletions

View File

@ -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 ) )

View File

@ -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;

View File

@ -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 );

View File

@ -160,71 +160,6 @@
<event name="OnCheckBox">OnOptionChanged</event>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxCheckBox" expanded="1">
<property name="BottomDockable">1</property>
<property name="LeftDockable">1</property>
<property name="RightDockable">1</property>
<property name="TopDockable">1</property>
<property name="aui_layer"></property>
<property name="aui_name"></property>
<property name="aui_position"></property>
<property name="aui_row"></property>
<property name="best_size"></property>
<property name="bg"></property>
<property name="caption"></property>
<property name="caption_visible">1</property>
<property name="center_pane">0</property>
<property name="checked">0</property>
<property name="close_button">1</property>
<property name="context_help"></property>
<property name="context_menu">1</property>
<property name="default_pane">0</property>
<property name="dock">Dock</property>
<property name="dock_fixed">0</property>
<property name="docking">Left</property>
<property name="enabled">1</property>
<property name="fg"></property>
<property name="floatable">1</property>
<property name="font"></property>
<property name="gripper">0</property>
<property name="hidden">0</property>
<property name="id">wxID_ANY</property>
<property name="label">Ignore errors in shared schematic sheets</property>
<property name="max_size"></property>
<property name="maximize_button">0</property>
<property name="maximum_size"></property>
<property name="min_size"></property>
<property name="minimize_button">0</property>
<property name="minimum_size"></property>
<property name="moveable">1</property>
<property name="name">m_cbIgnoreOtherProjects</property>
<property name="pane_border">1</property>
<property name="pane_position"></property>
<property name="pane_size"></property>
<property name="permission">protected</property>
<property name="pin_button">1</property>
<property name="pos"></property>
<property name="resize">Resizable</property>
<property name="show">1</property>
<property name="size"></property>
<property name="style"></property>
<property name="subclass">; ; forward_declare</property>
<property name="toolbar_pane">0</property>
<property name="tooltip">Shared schematic sheets used in complex hierarchies have constraints. They are not always compatible with back annotation when updating footprints and values . &#x0A;If this option is selected, errors generated by sharing will be disabled.</property>
<property name="validator_data_type"></property>
<property name="validator_style">wxFILTER_NONE</property>
<property name="validator_type">wxDefaultValidator</property>
<property name="validator_variable"></property>
<property name="window_extra_style"></property>
<property name="window_name"></property>
<property name="window_style"></property>
<event name="OnCheckBox">OnOptionChanged</event>
</object>
</object>
</object>
</object>
</object>

View File

@ -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;

View File

@ -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 ),

View File

@ -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;

View File

@ -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 ) )