SCH_DIRECTIVE_LABEL: add missing virtual SwapData.

Fixes #11027
https://gitlab.com/kicad/code/kicad/issues/11027
This commit is contained in:
jean-pierre charras 2022-03-03 10:27:17 +01:00
parent a8c29c47cf
commit a0d68b8426
2 changed files with 12 additions and 0 deletions

View File

@ -921,6 +921,16 @@ SCH_DIRECTIVE_LABEL::SCH_DIRECTIVE_LABEL( const VECTOR2I& pos ) :
}
void SCH_DIRECTIVE_LABEL::SwapData( SCH_ITEM* aItem )
{
SCH_LABEL_BASE::SwapData( aItem );
SCH_DIRECTIVE_LABEL* label = static_cast<SCH_DIRECTIVE_LABEL*>( aItem );
std::swap( m_pinLength, label->m_pinLength );
std::swap( m_symbolSize, label->m_symbolSize );
}
SCH_DIRECTIVE_LABEL::SCH_DIRECTIVE_LABEL( const SCH_DIRECTIVE_LABEL& aClassLabel ) :
SCH_LABEL_BASE( aClassLabel )
{

View File

@ -230,6 +230,8 @@ public:
return new SCH_DIRECTIVE_LABEL( *this );
}
void SwapData( SCH_ITEM* aItem ) override;
int GetPinLength() const { return m_pinLength; }
void SetPinLength( int aLength ) { m_pinLength = aLength; }