Add missing connectiongraph recalculate for the cli schematic load

This commit is contained in:
Marek Roszko 2022-11-08 23:09:50 -05:00
parent 7c71f65869
commit 8832c5239e
1 changed files with 10 additions and 2 deletions

View File

@ -146,13 +146,21 @@ SCHEMATIC* EESCHEMA_HELPERS::LoadSchematic( wxString& aFileName, SCH_IO_MGR::SCH
sheetList.UpdateSheetInstances( schematic->RootScreen()->GetSheetInstances() ); sheetList.UpdateSheetInstances( schematic->RootScreen()->GetSheetInstances() );
sheetList.AnnotatePowerSymbols();
schematic->ConnectionGraph()->Reset(); schematic->ConnectionGraph()->Reset();
schematic->SetSheetNumberAndCount(); schematic->SetSheetNumberAndCount();
schematic->RecomputeIntersheetRefs( true, []( SCH_GLOBALLABEL* ) { } ); schematic->RecomputeIntersheetRefs( true, []( SCH_GLOBALLABEL* ) { } );
schematic->CurrentSheet().UpdateAllScreenReferences();
schematic->CurrentSheet().LastScreen()->TestDanglingEnds( nullptr, nullptr ); for( SCH_SHEET_PATH& sheet : sheetList )
{
sheet.UpdateAllScreenReferences();
sheet.LastScreen()->TestDanglingEnds( nullptr, nullptr );
}
schematic->ConnectionGraph()->Recalculate( sheetList, true );
return schematic; return schematic;
} }