Fix debug assertion in Altium and CADSTAR schematic importers.
This commit is contained in:
parent
b7af66e3f9
commit
af280f80e0
|
@ -177,6 +177,8 @@ SCH_SHEET* SCH_ALTIUM_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchem
|
||||||
m_rootSheet = new SCH_SHEET( aSchematic );
|
m_rootSheet = new SCH_SHEET( aSchematic );
|
||||||
m_rootSheet->SetFileName( fileName.GetFullPath() );
|
m_rootSheet->SetFileName( fileName.GetFullPath() );
|
||||||
|
|
||||||
|
aSchematic->SetRoot( m_rootSheet );
|
||||||
|
|
||||||
SCH_SHEET_PATH sheetpath;
|
SCH_SHEET_PATH sheetpath;
|
||||||
sheetpath.push_back( m_rootSheet );
|
sheetpath.push_back( m_rootSheet );
|
||||||
|
|
||||||
|
|
|
@ -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
|
loadTextVariables(); // Load text variables right at the start to ensure bounding box
|
||||||
// calculations work correctly for text items
|
// calculations work correctly for text items
|
||||||
checkPoint(); // Step 1
|
checkPoint(); // Step 1
|
||||||
loadSheets();
|
loadSheets();
|
||||||
checkPoint(); // Step 2
|
checkPoint(); // Step 2
|
||||||
loadHierarchicalSheetPins();
|
loadHierarchicalSheetPins();
|
||||||
checkPoint(); // Step 3
|
checkPoint(); // Step 3
|
||||||
loadPartsLibrary();
|
loadPartsLibrary();
|
||||||
checkPoint(); // Step 4, Subdivided into extra steps
|
checkPoint(); // Step 4, Subdivided into extra steps
|
||||||
loadSchematicSymbolInstances();
|
loadSchematicSymbolInstances();
|
||||||
checkPoint(); // Step 5
|
checkPoint(); // Step 5
|
||||||
loadBusses();
|
loadBusses();
|
||||||
checkPoint(); // Step 6
|
checkPoint(); // Step 6
|
||||||
loadNets();
|
loadNets();
|
||||||
checkPoint(); // Step 7
|
checkPoint(); // Step 7
|
||||||
loadFigures();
|
loadFigures();
|
||||||
checkPoint(); // Step 8
|
checkPoint(); // Step 8
|
||||||
loadTexts();
|
loadTexts();
|
||||||
checkPoint(); // Step 9
|
checkPoint(); // Step 9
|
||||||
loadDocumentationSymbols();
|
loadDocumentationSymbols();
|
||||||
checkPoint(); // Step 10
|
checkPoint(); // Step 10
|
||||||
|
|
||||||
if( Schematic.VariantHierarchy.Variants.size() > 0 )
|
if( Schematic.VariantHierarchy.Variants.size() > 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* 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 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
|
* 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
|
* 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 = new SCH_SHEET( aSchematic );
|
||||||
rootSheet->SetFileName( aFileName );
|
rootSheet->SetFileName( aFileName );
|
||||||
|
aSchematic->SetRoot( rootSheet );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue