From 767aab7294af7e0a53d5b3cf170053b8b461256a Mon Sep 17 00:00:00 2001 From: Roberto Fernandez Bautista Date: Sun, 28 Mar 2021 20:41:12 +0100 Subject: [PATCH] CADSTAR Schematic: Fix up junctions after load --- eeschema/files-io.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eeschema/files-io.cpp b/eeschema/files-io.cpp index 0c453148c7..09a7889380 100644 --- a/eeschema/files-io.cpp +++ b/eeschema/files-io.cpp @@ -931,8 +931,9 @@ bool SCH_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType ) { wxFileName newfilename; SCH_SHEET_LIST sheetList = Schematic().GetSheets(); + SCH_IO_MGR::SCH_FILE_T fileType = (SCH_IO_MGR::SCH_FILE_T) aFileType; - switch( (SCH_IO_MGR::SCH_FILE_T) aFileType ) + switch( fileType ) { case SCH_IO_MGR::SCH_ALTIUM: case SCH_IO_MGR::SCH_CADSTAR_ARCHIVE: @@ -980,6 +981,11 @@ bool SCH_EDIT_FRAME::importFile( const wxString& aFileName, int aFileType ) GetScreen()->SetFileName( newfilename.GetFullPath() ); GetScreen()->SetModify(); + // Only fix junctions for CADSTAR importer for now as it may cause issues with + // other importers + if( fileType == SCH_IO_MGR::SCH_CADSTAR_ARCHIVE ) + FixupJunctions(); + // Only perform the dangling end test on root sheet. GetScreen()->TestDanglingEnds();