diff --git a/eeschema/sch_label.cpp b/eeschema/sch_label.cpp index e5b4fe24bc..87251cca45 100644 --- a/eeschema/sch_label.cpp +++ b/eeschema/sch_label.cpp @@ -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( 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 ) { diff --git a/eeschema/sch_label.h b/eeschema/sch_label.h index 8a67489556..de45defc50 100644 --- a/eeschema/sch_label.h +++ b/eeschema/sch_label.h @@ -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; }