CADSTAR Schematic Archive Importer: Autoplace fields when adding sheet

Makes the sheets look a little bit better when there is no block name
in the original CADSTAR design.
This commit is contained in:
Roberto Fernandez Bautista 2021-02-17 19:12:47 +00:00 committed by Wayne Stambaugh
parent 7b5cf955af
commit 842a930ced
1 changed files with 3 additions and 0 deletions

View File

@ -1908,6 +1908,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(
filename += wxT( "." ) + KiCadSchematicFileExtension;
filenameField.SetText( filename );
wxFileName fn( filename );
sheet->GetScreen()->SetFileName( fn.GetFullPath() );
aParentSheet.Last()->GetScreen()->Append( sheet );
@ -1917,6 +1918,8 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadSheetAndChildSheets(
wxString pageNumStr = wxString::Format( "%d", getSheetNumber( aCadstarSheetID ) );
sheet->SetPageNumber( instance, pageNumStr );
sheet->AutoplaceFields( /* aScreen */ NULL, /* aManual */ false );
m_sheetMap.insert( { aCadstarSheetID, sheet } );
loadChildSheets( aCadstarSheetID, instance );