|
|
@ -900,7 +900,7 @@ void SCH_SYMBOL::GetLibPins( std::vector<LIB_PIN*>& aPinsList ) const |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
SCH_PIN* SCH_SYMBOL::GetPin( LIB_PIN* aLibPin ) |
|
|
|
SCH_PIN* SCH_SYMBOL::GetPin( LIB_PIN* aLibPin ) const |
|
|
|
{ |
|
|
|
wxASSERT( m_pinMap.count( aLibPin ) ); |
|
|
|
return m_pins[ m_pinMap.at( aLibPin ) ].get(); |
|
|
@ -1908,22 +1908,38 @@ void SCH_SYMBOL::Plot( PLOTTER* aPlotter, bool aBackground ) const |
|
|
|
|
|
|
|
if( m_part ) |
|
|
|
{ |
|
|
|
TRANSFORM temp = GetTransform(); |
|
|
|
aPlotter->StartBlock( nullptr ); |
|
|
|
LIB_PINS libPins; |
|
|
|
m_part->GetPins( libPins, GetUnit(), GetConvert() ); |
|
|
|
|
|
|
|
bool local_background = true; |
|
|
|
// Copy the source so we can re-orient and translate it.
|
|
|
|
LIB_SYMBOL tempSymbol( *m_part ); |
|
|
|
LIB_PINS tempPins; |
|
|
|
tempSymbol.GetPins( tempPins, GetUnit(), GetConvert() ); |
|
|
|
|
|
|
|
m_part->Plot( aPlotter, GetUnit(), GetConvert(), local_background, m_pos, temp ); |
|
|
|
// Copy the pin info from the symbol to the temp pins
|
|
|
|
for( unsigned i = 0; i < tempPins.size(); ++ i ) |
|
|
|
{ |
|
|
|
SCH_PIN* symbolPin = GetPin( libPins[ i ] ); |
|
|
|
LIB_PIN* tempPin = tempPins[ i ]; |
|
|
|
|
|
|
|
for( SCH_FIELD field : m_fields ) |
|
|
|
field.Plot( aPlotter, local_background ); |
|
|
|
tempPin->SetName( symbolPin->GetShownName() ); |
|
|
|
tempPin->SetType( symbolPin->GetType() ); |
|
|
|
tempPin->SetShape( symbolPin->GetShape() ); |
|
|
|
|
|
|
|
local_background = false; |
|
|
|
if( symbolPin->IsDangling() ) |
|
|
|
tempPin->SetFlags( IS_DANGLING ); |
|
|
|
} |
|
|
|
|
|
|
|
m_part->Plot( aPlotter, GetUnit(), GetConvert(), local_background, m_pos, temp ); |
|
|
|
TRANSFORM temp = GetTransform(); |
|
|
|
aPlotter->StartBlock( nullptr ); |
|
|
|
|
|
|
|
for( bool local_background : { true, false } ) |
|
|
|
{ |
|
|
|
tempSymbol.Plot( aPlotter, GetUnit(), GetConvert(), local_background, m_pos, temp ); |
|
|
|
|
|
|
|
for( SCH_FIELD field : m_fields ) |
|
|
|
field.Plot( aPlotter, local_background ); |
|
|
|
for( SCH_FIELD field : m_fields ) |
|
|
|
field.Plot( aPlotter, local_background ); |
|
|
|
} |
|
|
|
|
|
|
|
aPlotter->EndBlock( nullptr ); |
|
|
|
} |
|
|
|