Browse Source

CONNECTION_GRAPH::Recalculate(): ensure unit and pin list are up to date.

Multi-unit symbols created previously incorrect connections, due to not
up to date or missing data. I also saw crashes due to this not up to date data
Fixes #12149
https://gitlab.com/kicad/code/kicad/issues/12149
7.0
jean-pierre charras 3 years ago
parent
commit
7441510b3c
  1. 8
      eeschema/connection_graph.cpp

8
eeschema/connection_graph.cpp

@ -469,6 +469,14 @@ void CONNECTION_GRAPH::Recalculate( const SCH_SHEET_LIST& aSheetList, bool aUnco
{
if( item->IsConnectable() && ( aUnconditional || item->IsConnectivityDirty() ) )
items.push_back( item );
// Ensure the hierarchy info stored in SCREENS is built and up to date
// (multi-unit symbols and pin mapping)
if( item->Type() == SCH_SYMBOL_T )
{
SCH_SYMBOL* symbol = static_cast<SCH_SYMBOL*>( item );
symbol->UpdateUnit( symbol->GetUnitSelection( &sheet ) );
}
}
m_items.reserve( m_items.size() + items.size() );

Loading…
Cancel
Save