diff --git a/pcbnew/router/pns_router.cpp b/pcbnew/router/pns_router.cpp index 3d0520b436..8aff5ebc58 100644 --- a/pcbnew/router/pns_router.cpp +++ b/pcbnew/router/pns_router.cpp @@ -589,7 +589,7 @@ bool ROUTER::Finish() } -bool ROUTER::ContinueFromEnd() +bool ROUTER::ContinueFromEnd( ITEM** aNewStartItem ) { PLACEMENT_ALGO* placer = Placer(); @@ -620,7 +620,9 @@ bool ROUTER::ContinueFromEnd() return false; // Attempt to route to our current position - Move( currentEnd, current ); + Move( currentEnd, nullptr ); + + *aNewStartItem = otherEndItem; return true; } diff --git a/pcbnew/router/pns_router.h b/pcbnew/router/pns_router.h index 3fa1e1115b..1f80e8b41c 100644 --- a/pcbnew/router/pns_router.h +++ b/pcbnew/router/pns_router.h @@ -147,7 +147,7 @@ public: bool StartRouting( const VECTOR2I& aP, ITEM* aItem, int aLayer ); bool Move( const VECTOR2I& aP, ITEM* aItem ); bool Finish(); - bool ContinueFromEnd(); + bool ContinueFromEnd( ITEM** aNewStartItem ); bool FixRoute( const VECTOR2I& aP, ITEM* aItem, bool aForceFinish = false ); void BreakSegment( ITEM *aItem, const VECTOR2I& aP ); diff --git a/pcbnew/router/router_tool.cpp b/pcbnew/router/router_tool.cpp index 59555e805e..60754c11fd 100644 --- a/pcbnew/router/router_tool.cpp +++ b/pcbnew/router/router_tool.cpp @@ -1378,10 +1378,11 @@ void ROUTER_TOOL::performRouting() { bool needsAppend = m_router->Placer()->HasPlacedAnything(); - if( m_router->ContinueFromEnd() ) + if( m_router->ContinueFromEnd( &m_startItem ) ) { syncRouterAndFrameLayer(); m_startSnapPoint = m_router->Placer()->CurrentStart(); + updateEndItem( *evt ); // Warp the mouse to wherever we actually ended up routing to controls()->WarpMouseCursor( m_router->Placer()->CurrentEnd(), true, true );