From c2fae3768c7797fd6bc4bfc37985250a7da0b8a4 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 4 May 2024 17:29:09 +0100 Subject: [PATCH] Fix knock-on effects from b7f035964fc8f4db6acb37dc3fe4718ed7b59169. Fixes https://gitlab.com/kicad/code/kicad/-/issues/17924 --- eeschema/sch_io/altium/sch_io_altium.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/eeschema/sch_io/altium/sch_io_altium.cpp b/eeschema/sch_io/altium/sch_io_altium.cpp index a141b2226f..5d431198f3 100644 --- a/eeschema/sch_io/altium/sch_io_altium.cpp +++ b/eeschema/sch_io/altium/sch_io_altium.cpp @@ -1127,6 +1127,9 @@ void SCH_IO_ALTIUM::ParseComponent( int aIndex, const std::mapSetPosition( elem.location + m_sheetOffset ); + for( SCH_FIELD& field : symbol->GetFields() ) + field.SetVisible( false ); + // TODO: keep it simple for now, and only set position. // component->SetOrientation( elem.orientation ); symbol->SetLibId( libId ); @@ -3196,6 +3199,7 @@ void SCH_IO_ALTIUM::ParsePowerPort( const std::map& aPropert libSymbol->SetPower(); libSymbol->SetName( elem.text ); libSymbol->GetReferenceField().SetText( "#PWR" ); + libSymbol->GetReferenceField().SetVisible( false ); libSymbol->GetValueField().SetText( elem.text ); libSymbol->GetValueField().SetVisible( true ); libSymbol->SetDescription( wxString::Format( _( "Power symbol creates a global " @@ -3229,6 +3233,7 @@ void SCH_IO_ALTIUM::ParsePowerPort( const std::map& aPropert // each symbol has its own powerSymbolIt for now SCH_SYMBOL* symbol = new SCH_SYMBOL(); symbol->SetRef( &m_sheetPath, "#PWR?" ); + symbol->GetField( REFERENCE_FIELD )->SetVisible( false ); symbol->SetValueFieldText( elem.text ); symbol->SetLibId( libId ); symbol->SetLibSymbol( new LIB_SYMBOL( *libSymbol ) );