diff --git a/pcbnew/router/pns_shove.cpp b/pcbnew/router/pns_shove.cpp index 97dbcfc8e2..5af8bc70c6 100644 --- a/pcbnew/router/pns_shove.cpp +++ b/pcbnew/router/pns_shove.cpp @@ -622,12 +622,6 @@ SHOVE::SHOVE_STATUS SHOVE::pushVia( VIA* aVia, const VECTOR2I& aForce, int aCurr pushedVia->SetPos( p0_pushed ); pushedVia->Mark( aVia->Marker() ); - if( aVia->Marker() & MK_HEAD ) - { - m_draggedVia = pushedVia.get(); - m_draggedViaHeadSet.Clear(); - } - for( ITEM* item : jt->LinkList() ) { if( SEGMENT* seg = dyn_cast( item ) ) @@ -671,6 +665,12 @@ SHOVE::SHOVE_STATUS SHOVE::pushVia( VIA* aVia, const VECTOR2I& aForce, int aCurr m_logger.Log( pushedVia.get(), 1, "pushed-via" ); #endif + if( aVia->Marker() & MK_HEAD ) + { + m_draggedVia = pushedVia.get(); + m_draggedViaHeadSet.Clear(); + } + replaceItems( aVia, std::move( pushedVia ) ); for( LINE_PAIR lp : draggedLines )