CADSTAR Schematic: Hide all KiCad sheet properties

Sheet name/filename not applicable in CADSTAR so displaying it just
makes the import look messy.
This commit is contained in:
Roberto Fernandez Bautista 2021-10-17 18:31:42 +01:00
parent 927b633c01
commit 3ea3d5274c
1 changed files with 11 additions and 9 deletions

View File

@ -2190,9 +2190,7 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets( LAYER_ID aCadstarSheetID,
loadSheetAndChildSheets( block.AssocLayerID, blockExtents.first, blockExtents.second,
aSheet );
if( block.HasBlockLabel )
{
// Add the block label as a separate field
// Hide all KiCad sheet properties (sheet name/filename is not applicable in CADSTAR)
SCH_SHEET* loadedSheet = m_sheetMap.at( block.AssocLayerID );
SCH_FIELDS fields = loadedSheet->GetFields();
@ -2201,6 +2199,9 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets( LAYER_ID aCadstarSheetID,
field.SetVisible( false );
}
if( block.HasBlockLabel )
{
// Add the block label as a separate field
SCH_FIELD blockNameField( getKiCadPoint( block.BlockLabel.Position ), 2,
loadedSheet, wxString( "Block name" ) );
blockNameField.SetText( block.Name );
@ -2214,8 +2215,9 @@ void CADSTAR_SCH_ARCHIVE_LOADER::loadChildSheets( LAYER_ID aCadstarSheetID,
block.BlockLabel.Mirror );
fields.push_back( blockNameField );
loadedSheet->SetFields( fields );
}
loadedSheet->SetFields( fields );
}
}
}