Add missing pin numbers/names properties
This commit is contained in:
parent
0778a7d46d
commit
899ed59f7b
|
@ -2673,6 +2673,24 @@ static struct SCH_SYMBOL_DESC
|
|||
propMgr.AddProperty( new PROPERTY<SCH_SYMBOL, bool>( _HKI( "Mirror Y" ),
|
||||
&SCH_SYMBOL::SetMirrorY, &SCH_SYMBOL::GetMirrorY ) );
|
||||
|
||||
auto hasLibPart = []( INSPECTABLE* aItem ) -> bool
|
||||
{
|
||||
if( SCH_SYMBOL* symbol = dynamic_cast<SCH_SYMBOL*>( aItem ) )
|
||||
return symbol->GetLibSymbolRef().get() != nullptr;
|
||||
|
||||
return false;
|
||||
};
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<SCH_SYMBOL, bool>( _HKI( "Pin numbers" ),
|
||||
&SCH_SYMBOL::SetShowPinNumbers,
|
||||
&SCH_SYMBOL::GetShowPinNumbers ) )
|
||||
.SetAvailableFunc( hasLibPart );
|
||||
|
||||
propMgr.AddProperty( new PROPERTY<SCH_SYMBOL, bool>( _HKI( "Pin names" ),
|
||||
&SCH_SYMBOL::SetShowPinNames,
|
||||
&SCH_SYMBOL::GetShowPinNames ) )
|
||||
.SetAvailableFunc( hasLibPart );
|
||||
|
||||
auto isMultiUnitSymbol =
|
||||
[]( INSPECTABLE* aItem ) -> bool
|
||||
{
|
||||
|
|
|
@ -863,6 +863,25 @@ public:
|
|||
bool GetDNP() const { return m_DNP; }
|
||||
void SetDNP( bool aDNP ) { m_DNP = aDNP; }
|
||||
|
||||
bool GetShowPinNumbers() const
|
||||
{
|
||||
return m_part && m_part->ShowPinNumbers();
|
||||
}
|
||||
|
||||
void SetShowPinNumbers( bool aShow )
|
||||
{
|
||||
if( m_part )
|
||||
m_part->SetShowPinNumbers( aShow );
|
||||
}
|
||||
|
||||
bool GetShowPinNames() const { return m_part && m_part->ShowPinNames(); }
|
||||
|
||||
void SetShowPinNames( bool aShow )
|
||||
{
|
||||
if( m_part )
|
||||
m_part->SetShowPinNames( aShow );
|
||||
}
|
||||
|
||||
bool IsPointClickableAnchor( const VECTOR2I& aPos ) const override;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue