Browse Source

Add sheetpath instances when importing sheets from Altium.

6.0.7
Jeff Young 5 years ago
parent
commit
db91908c18
  1. 15
      eeschema/sch_plugins/altium/sch_altium_plugin.cpp

15
eeschema/sch_plugins/altium/sch_altium_plugin.cpp

@ -179,6 +179,13 @@ SCH_SHEET* SCH_ALTIUM_PLUGIN::Load( const wxString& aFileName, SCHEMATIC* aSchem
{
m_rootSheet = new SCH_SHEET( aSchematic );
m_rootSheet->SetFileName( fileName.GetFullPath() );
SCH_SHEET_PATH sheetpath;
sheetpath.push_back( m_rootSheet );
m_rootSheet->AddInstance( sheetpath.Path() );
m_rootSheet->SetPageNumber( sheetpath, "#" ); // We'll update later if we find a
// pageNumber record for it
}
if( !m_rootSheet->GetScreen() )
@ -1447,6 +1454,14 @@ void SCH_ALTIUM_PLUGIN::ParseSheetSymbol( int aIndex, const std::map<wxString,
sheet->SetFlags( IS_NEW );
m_currentSheet->GetScreen()->Append( sheet );
SCH_SHEET_PATH sheetpath;
m_rootSheet->LocatePathOfScreen( m_currentSheet->GetScreen(), &sheetpath );
sheetpath.push_back( sheet );
sheet->AddInstance( sheetpath.Path() );
sheet->SetPageNumber( sheetpath, "#" ); // We'll update later if we find a pageNumber
// record for it
m_sheets.insert( { aIndex, sheet } );
}

Loading…
Cancel
Save