From e21f0ec9fb1dae2372d02d09249e008160558810 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 29 Mar 2022 13:43:00 +0100 Subject: [PATCH] Honour prime-event-location when starting router. Fixes https://gitlab.com/kicad/code/kicad/issues/11239 (cherry picked from commit a54bbfe12b31366a8f1bb3aa03d35aaa1a9d3bc8) --- pcbnew/router/pns_tool_base.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcbnew/router/pns_tool_base.cpp b/pcbnew/router/pns_tool_base.cpp index c03c6e1b08..1810789d05 100644 --- a/pcbnew/router/pns_tool_base.cpp +++ b/pcbnew/router/pns_tool_base.cpp @@ -276,7 +276,8 @@ bool TOOL_BASE::checkSnap( ITEM *aItem ) void TOOL_BASE::updateStartItem( const TOOL_EVENT& aEvent, bool aIgnorePads ) { int tl = getView()->GetTopLayer(); - VECTOR2I cp = controls()->GetCursorPosition( !aEvent.Modifier( MD_SHIFT ) ); + VECTOR2I cp = aEvent.IsPrime() ? aEvent.Position() + : controls()->GetCursorPosition( !aEvent.Modifier( MD_SHIFT ) ); VECTOR2I p; GAL* gal = m_toolMgr->GetView()->GetGAL();