Fix Altium schematic import library symbol bug.
This commit is contained in:
parent
acc760dc25
commit
a89102fdfc
|
@ -373,7 +373,7 @@ void SCH_ALTIUM_PLUGIN::ParseAltiumSch( const wxString& aFileName )
|
|||
{
|
||||
sheet->SetScreen( new SCH_SCREEN( m_schematic ) );
|
||||
SCH_SCREEN* screen = sheet->GetScreen();
|
||||
|
||||
sheet->SetName( loadAltiumFileName.GetName() );
|
||||
wxCHECK2( screen, continue );
|
||||
|
||||
m_sheetPath.push_back( sheet );
|
||||
|
@ -793,8 +793,17 @@ void SCH_ALTIUM_PLUGIN::ParseComponent( int aIndex,
|
|||
auto pair = m_altiumComponents.insert( { aIndex, ASCH_SYMBOL( aProperties ) } );
|
||||
const ASCH_SYMBOL& elem = pair.first->second;
|
||||
|
||||
SCH_SHEET* currentSheet = m_sheetPath.Last();
|
||||
wxCHECK( currentSheet, /* void */ );
|
||||
|
||||
wxString sheetName = currentSheet->GetName();
|
||||
|
||||
if( sheetName.IsEmpty() )
|
||||
sheetName = wxT( "root" );
|
||||
|
||||
// TODO: this is a hack until we correctly apply all transformations to every element
|
||||
wxString name = wxString::Format( "%d%s_%s",
|
||||
wxString name = wxString::Format( "%s_%d%s_%s",
|
||||
sheetName,
|
||||
elem.orientation,
|
||||
elem.isMirrored ? "_mirrored" : "",
|
||||
elem.libreference );
|
||||
|
|
|
@ -99,6 +99,7 @@ public:
|
|||
void SetFields( const std::vector<SCH_FIELD>& aFields );
|
||||
|
||||
wxString GetName() const { return m_fields[ SHEETNAME ].GetText(); }
|
||||
void SetName( const wxString& aName ) { m_fields[ SHEETNAME ].SetText( aName ); }
|
||||
|
||||
SCH_SCREEN* GetScreen() const { return m_screen; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue