Fix debug assertion in Altium and CADSTAR schematic importers.

This commit is contained in:
Wayne Stambaugh 2021-12-08 19:14:04 -05:00
parent b7af66e3f9
commit af280f80e0
3 changed files with 14 additions and 11 deletions

View File

@ -177,6 +177,8 @@ SCH_SHEET* SCH_ALTIUM_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchem
m_rootSheet = new SCH_SHEET( aSchematic );
m_rootSheet->SetFileName( fileName.GetFullPath() );
aSchematic->SetRoot( m_rootSheet );
SCH_SHEET_PATH sheetpath;
sheetpath.push_back( m_rootSheet );

View File

@ -103,25 +103,25 @@ void CADSTAR_SCH_ARCHIVE_LOADER::Load( SCHEMATIC* aSchematic, SCH_SHEET* aRootSh
loadTextVariables(); // Load text variables right at the start to ensure bounding box
// calculations work correctly for text items
checkPoint(); // Step 1
checkPoint(); // Step 1
loadSheets();
checkPoint(); // Step 2
checkPoint(); // Step 2
loadHierarchicalSheetPins();
checkPoint(); // Step 3
checkPoint(); // Step 3
loadPartsLibrary();
checkPoint(); // Step 4, Subdivided into extra steps
checkPoint(); // Step 4, Subdivided into extra steps
loadSchematicSymbolInstances();
checkPoint(); // Step 5
checkPoint(); // Step 5
loadBusses();
checkPoint(); // Step 6
checkPoint(); // Step 6
loadNets();
checkPoint(); // Step 7
checkPoint(); // Step 7
loadFigures();
checkPoint(); // Step 8
checkPoint(); // Step 8
loadTexts();
checkPoint(); // Step 9
checkPoint(); // Step 9
loadDocumentationSymbols();
checkPoint(); // Step 10
checkPoint(); // Step 10
if( Schematic.VariantHierarchy.Variants.size() > 0 )
{

View File

@ -2,7 +2,7 @@
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2020 Roberto Fernandez Bautista <roberto.fer.bau@gmail.com>
* Copyright (C) 2020 KiCad Developers, see AUTHORS.txt for contributors.
* Copyright (C) 2020-2021 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
@ -75,6 +75,7 @@ SCH_SHEET* CADSTAR_SCH_ARCHIVE_PLUGIN::Load( const wxString& aFileName, SCHEMATI
{
rootSheet = new SCH_SHEET( aSchematic );
rootSheet->SetFileName( aFileName );
aSchematic->SetRoot( rootSheet );
}