mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-09-14 02:03:12 +02:00
Don't both designers with unneeded changes
If we are not asking for fields to be removed when updating, then don't say we're doing anything if all we have to do is remove fields
This commit is contained in:
parent
6dd4e01f16
commit
ea8206eca5
@ -484,12 +484,14 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint,
|
|||||||
// the footprint fields to match the symbol, so we manually check the fields
|
// the footprint fields to match the symbol, so we manually check the fields
|
||||||
// in the order they are stored in the symbol.
|
// in the order they are stored in the symbol.
|
||||||
bool same = true;
|
bool same = true;
|
||||||
|
bool remove_only = true;
|
||||||
|
|
||||||
for( const auto& [name, value] : compFields )
|
for( const auto& [name, value] : compFields )
|
||||||
{
|
{
|
||||||
if( fpFieldsAsMap.count( name ) == 0 || fpFieldsAsMap[name] != value )
|
if( fpFieldsAsMap.count( name ) == 0 || fpFieldsAsMap[name] != value )
|
||||||
{
|
{
|
||||||
same = false;
|
same = false;
|
||||||
|
remove_only = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -507,7 +509,7 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint,
|
|||||||
{
|
{
|
||||||
if( m_isDryRun )
|
if( m_isDryRun )
|
||||||
{
|
{
|
||||||
if( m_updateFields )
|
if( m_updateFields && ( !remove_only || m_removeExtraFields ) )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Update %s fields." ), aPcbFootprint->GetReference() );
|
msg.Printf( _( "Update %s fields." ), aPcbFootprint->GetReference() );
|
||||||
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
@ -534,7 +536,7 @@ bool BOARD_NETLIST_UPDATER::updateFootprintParameters( FOOTPRINT* aPcbFootprint,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if( m_updateFields )
|
if( m_updateFields && ( !remove_only || m_removeExtraFields ) )
|
||||||
{
|
{
|
||||||
msg.Printf( _( "Updated %s fields." ), aPcbFootprint->GetReference() );
|
msg.Printf( _( "Updated %s fields." ), aPcbFootprint->GetReference() );
|
||||||
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
m_reporter->Report( msg, RPT_SEVERITY_ACTION );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user