Suppress ERC warnings about multiple labels if the text is the same
This commit is contained in:
parent
b15da3c656
commit
b687a178ef
|
@ -155,6 +155,21 @@ bool CONNECTION_SUBGRAPH::ResolveDrivers( bool aCreateMarkers )
|
||||||
|
|
||||||
if( aCreateMarkers && !m_multiple_power_ports &&
|
if( aCreateMarkers && !m_multiple_power_ports &&
|
||||||
candidates.size() > 1 && highest_priority > 1 )
|
candidates.size() > 1 && highest_priority > 1 )
|
||||||
|
{
|
||||||
|
// First check if all the candidates are actually the same
|
||||||
|
bool same = true;
|
||||||
|
auto first = candidates[0]->Connection( m_sheet )->Name();
|
||||||
|
|
||||||
|
for( unsigned i = 1; i < candidates.size(); i++ )
|
||||||
|
{
|
||||||
|
if( candidates[i]->Connection( m_sheet )->Name() != first )
|
||||||
|
{
|
||||||
|
same = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if( !same )
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
msg.Printf( _( "%s and %s are both attached to the same wires. "
|
msg.Printf( _( "%s and %s are both attached to the same wires. "
|
||||||
|
@ -179,6 +194,7 @@ bool CONNECTION_SUBGRAPH::ResolveDrivers( bool aCreateMarkers )
|
||||||
// should return false even if the driver was assigned
|
// should return false even if the driver was assigned
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return aCreateMarkers || ( m_driver != nullptr );
|
return aCreateMarkers || ( m_driver != nullptr );
|
||||||
}
|
}
|
||||||
|
@ -453,6 +469,7 @@ void CONNECTION_GRAPH::updateItemConnectivity( SCH_SHEET_PATH aSheet,
|
||||||
test_item->ConnectedItems().insert( connected_item );
|
test_item->ConnectedItems().insert( connected_item );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set up the link between the bus entry net and the bus
|
||||||
if( connected_item->Type() == SCH_BUS_WIRE_ENTRY_T )
|
if( connected_item->Type() == SCH_BUS_WIRE_ENTRY_T )
|
||||||
{
|
{
|
||||||
if( test_item->Connection( aSheet )->IsBus() )
|
if( test_item->Connection( aSheet )->IsBus() )
|
||||||
|
@ -1327,8 +1344,15 @@ std::vector<CONNECTION_SUBGRAPH*> CONNECTION_GRAPH::GetBusesNeedingMigration()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( subgraph->GetBusLabels().size() > 1 )
|
if( subgraph->GetBusLabels().size() > 1 )
|
||||||
|
{
|
||||||
|
#ifdef CONNECTIVITY_DEBUG
|
||||||
|
wxLogDebug( "SG %ld (%s) has multiple bus labels", subgraph->m_code,
|
||||||
|
connection->Name() );
|
||||||
|
#endif
|
||||||
|
|
||||||
ret.push_back( subgraph );
|
ret.push_back( subgraph );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -1766,6 +1790,10 @@ bool CONNECTION_GRAPH::ercCheckLabels( CONNECTION_SUBGRAPH* aSubgraph,
|
||||||
text = static_cast<SCH_TEXT*>( item );
|
text = static_cast<SCH_TEXT*>( item );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SCH_PIN_CONNECTION_T:
|
||||||
|
has_other_connections = true;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if( item->IsConnectable() )
|
if( item->IsConnectable() )
|
||||||
has_other_connections = true;
|
has_other_connections = true;
|
||||||
|
|
Loading…
Reference in New Issue