CADSTAR Schematic: Fix up junctions after load

This commit is contained in:
Roberto Fernandez Bautista 2021-03-28 20:41:12 +01:00 committed by Wayne Stambaugh
parent 1629b038e1
commit 767aab7294
1 changed files with 7 additions and 1 deletions

View File

@ -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();