Allow all selected footprints/symbols to be changed.
Fixes https://gitlab.com/kicad/code/kicad/issues/7389
This commit is contained in:
parent
389287e942
commit
e540752640
|
@ -73,7 +73,7 @@ DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS( SCH_EDIT_FRAME* aParent, SCH_SYMBO
|
|||
SCH_SHEET_PATH* currentSheet = &aParent->Schematic().CurrentSheet();
|
||||
|
||||
if( m_mode == MODE::CHANGE )
|
||||
m_matchBySelection->SetLabel( _( "Change selected Symbol" ) );
|
||||
m_matchBySelection->SetLabel( _( "Change selected symbol(s)" ) );
|
||||
|
||||
m_newId->AppendText( FROM_UTF8( m_symbol->GetLibId().Format().c_str() ) );
|
||||
m_specifiedReference->ChangeValue( m_symbol->GetRef( currentSheet ) );
|
||||
|
@ -395,7 +395,7 @@ bool DIALOG_CHANGE_SYMBOLS::isMatch( SCH_SYMBOL* aSymbol, SCH_SHEET_PATH* aInsta
|
|||
}
|
||||
else if( m_matchBySelection->GetValue() )
|
||||
{
|
||||
return aSymbol == m_symbol;
|
||||
return aSymbol == m_symbol || aSymbol->IsSelected();
|
||||
}
|
||||
else if( m_matchByReference->GetValue() )
|
||||
{
|
||||
|
|
|
@ -27,7 +27,7 @@ DIALOG_CHANGE_SYMBOLS_BASE::DIALOG_CHANGE_SYMBOLS_BASE( wxWindow* parent, wxWind
|
|||
m_matchAll = new wxRadioButton( this, wxID_ANY, _("Update all symbols in schematic"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_matchSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
||||
|
||||
m_matchBySelection = new wxRadioButton( this, wxID_ANY, _("Update selected symbol"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_matchBySelection = new wxRadioButton( this, wxID_ANY, _("Update selected symbol(s)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_matchSizer->Add( m_matchBySelection, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
|
||||
|
||||
m_matchByReference = new wxRadioButton( this, wxID_ANY, _("Update symbols matching reference designator:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
|
|
@ -185,7 +185,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Update selected symbol</property>
|
||||
<property name="label">Update selected symbol(s)</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
|
|
@ -73,7 +73,7 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent,
|
|||
{
|
||||
SetTitle( _( "Change Footprints" ) );
|
||||
m_matchAll->SetLabel( _( "Change all footprints on board" ) );
|
||||
m_matchSelected->SetLabel( _( "Change selected footprint" ) );
|
||||
m_matchSelected->SetLabel( _( "Change selected footprint(s)" ) );
|
||||
m_matchSpecifiedRef->SetLabel( _( "Change footprints matching reference designator:" ) );
|
||||
m_matchSpecifiedValue->SetLabel( _( "Change footprints matching value:" ) );
|
||||
m_matchSpecifiedID->SetLabel( _( "Change footprints with library id:" ) );
|
||||
|
@ -190,7 +190,7 @@ bool DIALOG_EXCHANGE_FOOTPRINTS::isMatch( FOOTPRINT* aFootprint )
|
|||
case ID_MATCH_FP_ALL:
|
||||
return true;
|
||||
case ID_MATCH_FP_SELECTED:
|
||||
return aFootprint == m_currentFootprint;
|
||||
return aFootprint == m_currentFootprint || aFootprint->IsSelected();
|
||||
case ID_MATCH_FP_REF:
|
||||
return WildCompareString( m_specifiedRef->GetValue(), aFootprint->GetReference(), false );
|
||||
case ID_MATCH_FP_VAL:
|
||||
|
|
|
@ -24,7 +24,7 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare
|
|||
m_matchAll = new wxRadioButton( this, wxID_ANY, _("Update all footprints on board"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_upperSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxEXPAND|wxALL, 5 );
|
||||
|
||||
m_matchSelected = new wxRadioButton( this, wxID_ANY, _("Update selected footprint"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_matchSelected = new wxRadioButton( this, wxID_ANY, _("Update selected footprint(s)"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_upperSizer->Add( m_matchSelected, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL, 5 );
|
||||
|
||||
m_matchSpecifiedRef = new wxRadioButton( this, wxID_ANY, _("Update footprints matching reference designator:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
|
|
|
@ -177,7 +177,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Update selected footprint</property>
|
||||
<property name="label">Update selected footprint(s)</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
|
|
@ -94,10 +94,6 @@ int GLOBAL_EDIT_TOOL::ExchangeFootprints( const TOOL_EVENT& aEvent )
|
|||
else
|
||||
wxFAIL_MSG( "ExchangeFootprints: unexpected action" );
|
||||
|
||||
// Footprint exchange could remove footprints, so they have to be
|
||||
// removed from the selection first
|
||||
m_toolMgr->RunAction( PCB_ACTIONS::selectionClear, true );
|
||||
|
||||
// invoke the exchange dialog process
|
||||
{
|
||||
PCB_EDIT_FRAME* editFrame = getEditFrame<PCB_EDIT_FRAME>();
|
||||
|
|
Loading…
Reference in New Issue