CADSTAR Schematic: Fix assert regarding sheet absolute path

This commit is contained in:
Roberto Fernandez Bautista 2021-05-28 17:06:22 +01:00
parent 63f56640db
commit 8d788b7a09
1 changed files with 2 additions and 2 deletions

View File

@ -266,7 +266,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSheets()
ReplaceIllegalFileNameChars( &filename ); ReplaceIllegalFileNameChars( &filename );
filename += wxT( "." ) + KiCadSchematicFileExtension; filename += wxT( "." ) + KiCadSchematicFileExtension;
wxFileName fn( filename ); wxFileName fn( m_schematic->Prj().GetProjectPath() + filename );
m_rootSheet->GetScreen()->SetFileName( fn.GetFullPath() ); m_rootSheet->GetScreen()->SetFileName( fn.GetFullPath() );
m_sheetMap.insert( { rootSheetID, m_rootSheet } ); m_sheetMap.insert( { rootSheetID, m_rootSheet } );
@ -2035,7 +2035,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(
filenameField.SetText( filename ); filenameField.SetText( filename );
wxFileName fn( filename ); wxFileName fn( m_schematic->Prj().GetProjectPath() + filename );
sheet->GetScreen()->SetFileName( fn.GetFullPath() ); sheet->GetScreen()->SetFileName( fn.GetFullPath() );
aParentSheet.Last()->GetScreen()->Append( sheet ); aParentSheet.Last()->GetScreen()->Append( sheet );
instance.push_back( sheet ); instance.push_back( sheet );