From 796aec6e6ef720a84abc4fedfee6178a91014f06 Mon Sep 17 00:00:00 2001 From: Tomasz Wlostowski Date: Fri, 28 Feb 2020 23:05:49 +0100 Subject: [PATCH] router: SOLID::SetPos() should update the shape position too --- pcbnew/router/pns_solid.cpp | 11 +++++++++++ pcbnew/router/pns_solid.h | 7 ++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/pcbnew/router/pns_solid.cpp b/pcbnew/router/pns_solid.cpp index 306d36c948..bb5252764a 100644 --- a/pcbnew/router/pns_solid.cpp +++ b/pcbnew/router/pns_solid.cpp @@ -79,4 +79,15 @@ ITEM* SOLID::Clone() const return solid; } +void SOLID::SetPos( const VECTOR2I& aCenter ) +{ + auto delta = aCenter - m_pos; + + if( m_shape ) + m_shape->Move( delta ); + + m_pos = aCenter; +} + + } diff --git a/pcbnew/router/pns_solid.h b/pcbnew/router/pns_solid.h index 27600bed92..77d86d21d0 100644 --- a/pcbnew/router/pns_solid.h +++ b/pcbnew/router/pns_solid.h @@ -78,11 +78,8 @@ public: return m_pos; } - void SetPos( const VECTOR2I& aCenter ) - { - m_pos = aCenter; - } - + void SetPos( const VECTOR2I& aCenter ); + int GetPadToDie() const { return m_padToDie;