User terminology specific to Change Footprint/Symbol.

Also implements separate session settings for the reset checkboxes
for Change Footprint and Update Footprint.

Fixes https://gitlab.com/kicad/code/kicad/issues/5614
This commit is contained in:
Jeff Young 2020-09-15 23:52:53 +01:00
parent 8b82852054
commit cdbe2fd2d2
7 changed files with 740 additions and 680 deletions

View File

@ -53,6 +53,8 @@ DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS( SCH_EDIT_FRAME* aParent, SCH_COMPO
wxASSERT( aParent ); wxASSERT( aParent );
wxString label; wxString label;
wxString verb = ( m_mode == MODE::UPDATE ) ? _( "Update" ) : _( "Change" ); wxString verb = ( m_mode == MODE::UPDATE ) ? _( "Update" ) : _( "Change" );
wxString reset = ( m_mode == MODE::UPDATE ) ? _( "Reset" ) : _( "Update" );
wxString library = ( m_mode == MODE::UPDATE ) ? _( "library" ) : _( "new" );
label.Printf( m_matchAll->GetLabel(), verb ); label.Printf( m_matchAll->GetLabel(), verb );
@ -111,6 +113,21 @@ DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS( SCH_EDIT_FRAME* aParent, SCH_COMPO
m_matchByReference->SetValue( true ); m_matchByReference->SetValue( true );
} }
label.Printf( m_removeExtraBox->GetLabel(), library );
m_removeExtraBox->SetLabel( label );
label.Printf( m_resetEmptyFields->GetLabel(), library );
m_resetEmptyFields->SetLabel( label );
label.Printf( m_resetFieldVisibilities->GetLabel(), reset );
m_resetFieldVisibilities->SetLabel( label );
label.Printf( m_resetFieldEffects->GetLabel(), reset );
m_resetFieldEffects->SetLabel( label );
label.Printf( m_resetFieldPositions->GetLabel(), reset );
m_resetFieldPositions->SetLabel( label );
m_removeExtraBox->SetValue( g_removeExtraFields ); m_removeExtraBox->SetValue( g_removeExtraFields );
m_resetEmptyFields->SetValue( g_resetEmptyFields ); m_resetEmptyFields->SetValue( g_resetEmptyFields );
m_resetFieldVisibilities->SetValue( g_resetFieldVisibilities ); m_resetFieldVisibilities->SetValue( g_resetFieldVisibilities );

View File

@ -17,45 +17,54 @@ DIALOG_CHANGE_SYMBOLS_BASE::DIALOG_CHANGE_SYMBOLS_BASE( wxWindow* parent, wxWind
m_mainSizer = new wxBoxSizer( wxVERTICAL ); m_mainSizer = new wxBoxSizer( wxVERTICAL );
m_matchSizer = new wxGridBagSizer( 5, 5 ); wxBoxSizer* matchSizerMargins;
matchSizerMargins = new wxBoxSizer( wxVERTICAL );
m_matchSizer = new wxGridBagSizer( 3, 5 );
m_matchSizer->SetFlexibleDirection( wxBOTH ); m_matchSizer->SetFlexibleDirection( wxBOTH );
m_matchSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); m_matchSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
m_matchAll = new wxRadioButton( this, wxID_ANY, _("%s all symbols in schematic"), wxDefaultPosition, wxDefaultSize, 0 ); m_matchAll = new wxRadioButton( this, wxID_ANY, _("%s all symbols in schematic"), wxDefaultPosition, wxDefaultSize, 0 );
m_matchSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); m_matchSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
m_matchBySelection = new wxRadioButton( this, wxID_ANY, _("%s selected symbol"), wxDefaultPosition, wxDefaultSize, 0 ); m_matchBySelection = new wxRadioButton( this, wxID_ANY, _("%s selected symbol"), wxDefaultPosition, wxDefaultSize, 0 );
m_matchSizer->Add( m_matchBySelection, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 3 ); m_matchSizer->Add( m_matchBySelection, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
m_matchByReference = new wxRadioButton( this, wxID_ANY, _("%s by reference:"), wxDefaultPosition, wxDefaultSize, 0 ); m_matchByReference = new wxRadioButton( this, wxID_ANY, _("%s by reference:"), wxDefaultPosition, wxDefaultSize, 0 );
m_matchSizer->Add( m_matchByReference, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); m_matchSizer->Add( m_matchByReference, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 2 );
m_specifiedReference = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), wxTE_PROCESS_ENTER ); m_specifiedReference = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), wxTE_PROCESS_ENTER );
m_matchSizer->Add( m_specifiedReference, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_matchSizer->Add( m_specifiedReference, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 2 );
m_matchByValue = new wxRadioButton( this, wxID_ANY, _("%s by value:"), wxDefaultPosition, wxDefaultSize, 0 ); m_matchByValue = new wxRadioButton( this, wxID_ANY, _("%s by value:"), wxDefaultPosition, wxDefaultSize, 0 );
m_matchSizer->Add( m_matchByValue, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); m_matchSizer->Add( m_matchByValue, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 );
m_specifiedValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); m_specifiedValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
m_matchSizer->Add( m_specifiedValue, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_matchSizer->Add( m_specifiedValue, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_matchById = new wxRadioButton( this, wxID_ANY, _("%s by library indentifier:"), wxDefaultPosition, wxDefaultSize, 0 ); m_matchById = new wxRadioButton( this, wxID_ANY, _("%s by library indentifier:"), wxDefaultPosition, wxDefaultSize, 0 );
m_matchSizer->Add( m_matchById, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); m_matchSizer->Add( m_matchById, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxTOP, 6 );
m_specifiedId = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); m_specifiedId = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
m_matchSizer->Add( m_specifiedId, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT, 5 ); m_matchSizer->Add( m_specifiedId, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
m_matchIdBrowserButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_matchIdBrowserButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
m_matchSizer->Add( m_matchIdBrowserButton, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_matchSizer->Add( m_matchIdBrowserButton, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 );
m_matchSizer->AddGrowableCol( 1 ); m_matchSizer->AddGrowableCol( 1 );
m_matchSizer->AddGrowableRow( 1 ); m_matchSizer->AddGrowableRow( 1 );
m_mainSizer->Add( m_matchSizer, 0, wxALL|wxEXPAND, 5 ); matchSizerMargins->Add( m_matchSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_mainSizer->Add( matchSizerMargins, 0, wxEXPAND|wxLEFT, 5 );
m_mainSizer->Add( 0, 8, 0, wxEXPAND, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
m_mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); m_mainSizer->Add( m_staticline1, 0, wxEXPAND|wxALL, 4 );
m_newIdSizer = new wxBoxSizer( wxVERTICAL ); m_newIdSizer = new wxBoxSizer( wxVERTICAL );
@ -71,38 +80,38 @@ DIALOG_CHANGE_SYMBOLS_BASE::DIALOG_CHANGE_SYMBOLS_BASE( wxWindow* parent, wxWind
bSizer1->Add( m_newId, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizer1->Add( m_newId, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_newIdBrowserButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); m_newIdBrowserButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
bSizer1->Add( m_newIdBrowserButton, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 2 ); bSizer1->Add( m_newIdBrowserButton, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
m_newIdSizer->Add( bSizer1, 0, wxEXPAND|wxBOTTOM, 5 ); m_newIdSizer->Add( bSizer1, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 );
m_mainSizer->Add( m_newIdSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_mainSizer->Add( m_newIdSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_updateOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Update Options") ), wxVERTICAL ); m_updateOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Update Options") ), wxVERTICAL );
m_removeExtraBox = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Remove fields which are not in library symbol"), wxDefaultPosition, wxDefaultSize, 0 ); m_removeExtraBox = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Remove fields which are not in %s symbol"), wxDefaultPosition, wxDefaultSize, 0 );
m_removeExtraBox->SetToolTip( _("Removes fields that do not occur in the original library symbols") ); m_removeExtraBox->SetToolTip( _("Removes fields that do not occur in the original library symbols") );
m_updateOptionsSizer->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT, 4 ); m_updateOptionsSizer->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT, 4 );
m_resetEmptyFields = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset fields which are empty in library"), wxDefaultPosition, wxDefaultSize, 0 ); m_resetEmptyFields = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset fields which are empty in %s symbol"), wxDefaultPosition, wxDefaultSize, 0 );
m_updateOptionsSizer->Add( m_resetEmptyFields, 0, wxBOTTOM|wxRIGHT, 4 ); m_updateOptionsSizer->Add( m_resetEmptyFields, 0, wxBOTTOM|wxRIGHT, 4 );
m_updateOptionsSizer->Add( 0, 6, 0, wxEXPAND, 5 ); m_updateOptionsSizer->Add( 0, 10, 0, wxEXPAND, 5 );
m_resetFieldVisibilities = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset field visibilities"), wxDefaultPosition, wxDefaultSize, 0 ); m_resetFieldVisibilities = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s field visibilities"), wxDefaultPosition, wxDefaultSize, 0 );
m_updateOptionsSizer->Add( m_resetFieldVisibilities, 0, wxBOTTOM|wxRIGHT, 4 ); m_updateOptionsSizer->Add( m_resetFieldVisibilities, 0, wxBOTTOM|wxRIGHT, 4 );
m_resetFieldEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset field sizes and styles"), wxDefaultPosition, wxDefaultSize, 0 ); m_resetFieldEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s field sizes and styles"), wxDefaultPosition, wxDefaultSize, 0 );
m_updateOptionsSizer->Add( m_resetFieldEffects, 0, wxBOTTOM|wxRIGHT, 4 ); m_updateOptionsSizer->Add( m_resetFieldEffects, 0, wxBOTTOM|wxRIGHT, 4 );
m_resetFieldPositions = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset field positions"), wxDefaultPosition, wxDefaultSize, 0 ); m_resetFieldPositions = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s field positions"), wxDefaultPosition, wxDefaultSize, 0 );
m_updateOptionsSizer->Add( m_resetFieldPositions, 0, wxBOTTOM|wxRIGHT, 4 ); m_updateOptionsSizer->Add( m_resetFieldPositions, 0, wxBOTTOM|wxRIGHT, 4 );
m_mainSizer->Add( m_updateOptionsSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); m_mainSizer->Add( m_updateOptionsSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 );
wxBoxSizer* bSizer2; wxBoxSizer* bSizer2;
bSizer2 = new wxBoxSizer( wxVERTICAL ); bSizer2 = new wxBoxSizer( wxVERTICAL );

View File

@ -60,7 +60,16 @@
<property name="permission">protected</property> <property name="permission">protected</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALL|wxEXPAND</property> <property name="flag">wxEXPAND|wxLEFT</property>
<property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property>
<property name="name">matchSizerMargins</property>
<property name="orient">wxVERTICAL</property>
<property name="permission">none</property>
<object class="sizeritem" expanded="1">
<property name="border">5</property>
<property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxGridBagSizer" expanded="1"> <object class="wxGridBagSizer" expanded="1">
<property name="empty_cell_size"></property> <property name="empty_cell_size"></property>
@ -72,12 +81,12 @@
<property name="name">m_matchSizer</property> <property name="name">m_matchSizer</property>
<property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property> <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="vgap">5</property> <property name="vgap">3</property>
<object class="gbsizeritem" expanded="1"> <object class="gbsizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">2</property> <property name="colspan">2</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM</property>
<property name="row">0</property> <property name="row">0</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxRadioButton" expanded="1"> <object class="wxRadioButton" expanded="1">
@ -141,10 +150,10 @@
</object> </object>
</object> </object>
<object class="gbsizeritem" expanded="1"> <object class="gbsizeritem" expanded="1">
<property name="border">3</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM</property>
<property name="row">1</property> <property name="row">1</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxRadioButton" expanded="1"> <object class="wxRadioButton" expanded="1">
@ -208,10 +217,10 @@
</object> </object>
</object> </object>
<object class="gbsizeritem" expanded="1"> <object class="gbsizeritem" expanded="1">
<property name="border">5</property> <property name="border">2</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM</property>
<property name="row">2</property> <property name="row">2</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxRadioButton" expanded="1"> <object class="wxRadioButton" expanded="1">
@ -276,10 +285,10 @@
</object> </object>
</object> </object>
<object class="gbsizeritem" expanded="1"> <object class="gbsizeritem" expanded="1">
<property name="border">5</property> <property name="border">2</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">1</property> <property name="column">1</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM</property>
<property name="row">2</property> <property name="row">2</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
@ -346,7 +355,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL</property>
<property name="row">3</property> <property name="row">3</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxRadioButton" expanded="1"> <object class="wxRadioButton" expanded="1">
@ -478,10 +487,10 @@
</object> </object>
</object> </object>
<object class="gbsizeritem" expanded="1"> <object class="gbsizeritem" expanded="1">
<property name="border">5</property> <property name="border">6</property>
<property name="colspan">2</property> <property name="colspan">2</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP</property>
<property name="row">4</property> <property name="row">4</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxRadioButton" expanded="1"> <object class="wxRadioButton" expanded="1">
@ -549,7 +558,7 @@
<property name="border">5</property> <property name="border">5</property>
<property name="colspan">2</property> <property name="colspan">2</property>
<property name="column">0</property> <property name="column">0</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
<property name="row">5</property> <property name="row">5</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxTextCtrl" expanded="1"> <object class="wxTextCtrl" expanded="1">
@ -613,10 +622,10 @@
</object> </object>
</object> </object>
<object class="gbsizeritem" expanded="1"> <object class="gbsizeritem" expanded="1">
<property name="border">5</property> <property name="border">3</property>
<property name="colspan">1</property> <property name="colspan">1</property>
<property name="column">2</property> <property name="column">2</property>
<property name="flag">wxALIGN_CENTER_VERTICAL</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
<property name="row">5</property> <property name="row">5</property>
<property name="rowspan">1</property> <property name="rowspan">1</property>
<object class="wxBitmapButton" expanded="1"> <object class="wxBitmapButton" expanded="1">
@ -690,8 +699,20 @@
</object> </object>
</object> </object>
</object> </object>
</object>
</object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property>
<property name="proportion">0</property>
<object class="spacer" expanded="1">
<property name="height">8</property>
<property name="permission">protected</property>
<property name="width">0</property>
</object>
</object>
<object class="sizeritem" expanded="1">
<property name="border">4</property>
<property name="flag">wxEXPAND|wxALL</property> <property name="flag">wxEXPAND|wxALL</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticLine" expanded="1"> <object class="wxStaticLine" expanded="1">
@ -750,7 +771,7 @@
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -819,8 +840,8 @@
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">2</property>
<property name="flag">wxEXPAND|wxBOTTOM</property> <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size"></property> <property name="minimum_size"></property>
@ -892,7 +913,7 @@
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">2</property> <property name="border">5</property>
<property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property> <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxBitmapButton" expanded="1"> <object class="wxBitmapButton" expanded="1">
@ -969,8 +990,8 @@
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">10</property> <property name="border">8</property>
<property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property> <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxStaticBoxSizer" expanded="1"> <object class="wxStaticBoxSizer" expanded="1">
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
@ -1013,7 +1034,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Remove fields which are not in library symbol</property> <property name="label">Remove fields which are not in %s symbol</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1077,7 +1098,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Reset fields which are empty in library</property> <property name="label">Reset fields which are empty in %s symbol</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1113,7 +1134,7 @@
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="spacer" expanded="1"> <object class="spacer" expanded="1">
<property name="height">6</property> <property name="height">10</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="width">0</property> <property name="width">0</property>
</object> </object>
@ -1151,7 +1172,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Reset field visibilities</property> <property name="label">%s field visibilities</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1215,7 +1236,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Reset field sizes and styles</property> <property name="label">%s field sizes and styles</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1279,7 +1300,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Reset field positions</property> <property name="label">%s field positions</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>

View File

@ -26,9 +26,9 @@ class WX_HTML_REPORT_PANEL;
#include <wx/icon.h> #include <wx/icon.h>
#include <wx/button.h> #include <wx/button.h>
#include <wx/gbsizer.h> #include <wx/gbsizer.h>
#include <wx/sizer.h>
#include <wx/statline.h> #include <wx/statline.h>
#include <wx/stattext.h> #include <wx/stattext.h>
#include <wx/sizer.h>
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/statbox.h> #include <wx/statbox.h>
#include <wx/panel.h> #include <wx/panel.h>

View File

@ -51,11 +51,11 @@ int g_matchModeForUpdateSelected = ID_MATCH_FP_SELECTED;
int g_matchModeForExchange = ID_MATCH_FP_REF; int g_matchModeForExchange = ID_MATCH_FP_REF;
int g_matchModeForExchangeSelected = ID_MATCH_FP_SELECTED; int g_matchModeForExchangeSelected = ID_MATCH_FP_SELECTED;
bool g_removeExtraTextItems = false; bool g_removeExtraTextItems[2] = { false, false };
bool g_resetTextItemLayers = false; bool g_resetTextItemLayers[2] = { false, true };
bool g_resetTextItemEffects = false; bool g_resetTextItemEffects[2] = { false, true };
bool g_resetFabricationAttrs = false; bool g_resetFabricationAttrs[2] = { false, true };
bool g_reset3DModels = false; bool g_reset3DModels[2] = { false, true };
DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, MODULE* aModule, DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, MODULE* aModule,
@ -68,6 +68,7 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent,
{ {
wxString title = updateMode ? _( "Update Footprints from Library" ) : _( "Change Footprints" ); wxString title = updateMode ? _( "Update Footprints from Library" ) : _( "Change Footprints" );
wxString verb = updateMode ? _( "Update" ) : _( "Change" ); wxString verb = updateMode ? _( "Update" ) : _( "Change" );
wxString reset = updateMode ? _( "Reset" ) : _( "Update" );
wxString label; wxString label;
SetTitle( title ); SetTitle( title );
@ -137,11 +138,23 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent,
default: break; default: break;
} }
m_removeExtraBox->SetValue( g_removeExtraTextItems ); label.Printf( m_resetTextItemLayers->GetLabel(), reset );
m_resetTextItemLayers->SetValue( g_resetTextItemLayers ); m_resetTextItemLayers->SetLabel( label );
m_resetTextItemEffects->SetValue( g_resetTextItemEffects );
m_resetFabricationAttrs->SetValue( g_resetFabricationAttrs ); label.Printf( m_resetTextItemEffects->GetLabel(), reset );
m_reset3DModels->SetValue( g_reset3DModels ); m_resetTextItemEffects->SetLabel( label );
label.Printf( m_resetFabricationAttrs->GetLabel(), reset );
m_resetFabricationAttrs->SetLabel( label );
label.Printf( m_reset3DModels->GetLabel(), reset );
m_reset3DModels->SetLabel( label );
m_removeExtraBox->SetValue( g_removeExtraTextItems[ m_updateMode ? 0 : 1 ] );
m_resetTextItemLayers->SetValue( g_resetTextItemLayers[ m_updateMode ? 0 : 1 ] );
m_resetTextItemEffects->SetValue( g_resetTextItemEffects[ m_updateMode ? 0 : 1 ] );
m_resetFabricationAttrs->SetValue( g_resetFabricationAttrs[ m_updateMode ? 0 : 1 ] );
m_reset3DModels->SetValue( g_reset3DModels[ m_updateMode ? 0 : 1 ] );
m_MessageWindow->SetLazyUpdate( true ); m_MessageWindow->SetLazyUpdate( true );
@ -162,11 +175,11 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent,
DIALOG_EXCHANGE_FOOTPRINTS::~DIALOG_EXCHANGE_FOOTPRINTS() DIALOG_EXCHANGE_FOOTPRINTS::~DIALOG_EXCHANGE_FOOTPRINTS()
{ {
g_removeExtraTextItems = m_removeExtraBox->GetValue(); g_removeExtraTextItems[ m_updateMode ? 0 : 1 ] = m_removeExtraBox->GetValue();
g_resetTextItemLayers = m_resetTextItemLayers->GetValue(); g_resetTextItemLayers[ m_updateMode ? 0 : 1 ] = m_resetTextItemLayers->GetValue();
g_resetTextItemEffects = m_resetTextItemEffects->GetValue(); g_resetTextItemEffects[ m_updateMode ? 0 : 1 ] = m_resetTextItemEffects->GetValue();
g_resetFabricationAttrs = m_resetFabricationAttrs->GetValue(); g_resetFabricationAttrs[ m_updateMode ? 0 : 1 ] = m_resetFabricationAttrs->GetValue();
g_reset3DModels = m_reset3DModels->GetValue(); g_reset3DModels[ m_updateMode ? 0 : 1 ] = m_reset3DModels->GetValue();
} }

View File

@ -98,16 +98,16 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare
m_updateOptionsSizer->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT, 5 ); m_updateOptionsSizer->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT, 5 );
m_resetTextItemLayers = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset text layers and visibilities"), wxDefaultPosition, wxDefaultSize, 0 ); m_resetTextItemLayers = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s text layers and visibilities"), wxDefaultPosition, wxDefaultSize, 0 );
m_updateOptionsSizer->Add( m_resetTextItemLayers, 0, wxBOTTOM|wxRIGHT, 5 ); m_updateOptionsSizer->Add( m_resetTextItemLayers, 0, wxBOTTOM|wxRIGHT, 5 );
m_resetTextItemEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset text sizes, styles and positions"), wxDefaultPosition, wxDefaultSize, 0 ); m_resetTextItemEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s text sizes, styles and positions"), wxDefaultPosition, wxDefaultSize, 0 );
m_updateOptionsSizer->Add( m_resetTextItemEffects, 0, wxBOTTOM|wxRIGHT, 5 ); m_updateOptionsSizer->Add( m_resetTextItemEffects, 0, wxBOTTOM|wxRIGHT, 5 );
m_resetFabricationAttrs = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset fabrication attributes"), wxDefaultPosition, wxDefaultSize, 0 ); m_resetFabricationAttrs = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s fabrication attributes"), wxDefaultPosition, wxDefaultSize, 0 );
m_updateOptionsSizer->Add( m_resetFabricationAttrs, 0, wxBOTTOM|wxRIGHT, 5 ); m_updateOptionsSizer->Add( m_resetFabricationAttrs, 0, wxBOTTOM|wxRIGHT, 5 );
m_reset3DModels = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset 3D models"), wxDefaultPosition, wxDefaultSize, 0 ); m_reset3DModels = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s 3D models"), wxDefaultPosition, wxDefaultSize, 0 );
m_updateOptionsSizer->Add( m_reset3DModels, 0, wxBOTTOM|wxRIGHT, 5 ); m_updateOptionsSizer->Add( m_reset3DModels, 0, wxBOTTOM|wxRIGHT, 5 );

View File

@ -1091,7 +1091,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Reset text layers and visibilities</property> <property name="label">%s text layers and visibilities</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1155,7 +1155,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Reset text sizes, styles and positions</property> <property name="label">%s text sizes, styles and positions</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1219,7 +1219,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Reset fabrication attributes</property> <property name="label">%s fabrication attributes</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>
@ -1283,7 +1283,7 @@
<property name="gripper">0</property> <property name="gripper">0</property>
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="label">Reset 3D models</property> <property name="label">%s 3D models</property>
<property name="max_size"></property> <property name="max_size"></property>
<property name="maximize_button">0</property> <property name="maximize_button">0</property>
<property name="maximum_size"></property> <property name="maximum_size"></property>