diff --git a/eeschema/eeschema_helpers.cpp b/eeschema/eeschema_helpers.cpp index 78f5c54220..ac269a3a15 100644 --- a/eeschema/eeschema_helpers.cpp +++ b/eeschema/eeschema_helpers.cpp @@ -146,13 +146,21 @@ SCHEMATIC* EESCHEMA_HELPERS::LoadSchematic( wxString& aFileName, SCH_IO_MGR::SCH sheetList.UpdateSheetInstances( schematic->RootScreen()->GetSheetInstances() ); + sheetList.AnnotatePowerSymbols(); + schematic->ConnectionGraph()->Reset(); schematic->SetSheetNumberAndCount(); 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; } \ No newline at end of file