From a54bbfe12b31366a8f1bb3aa03d35aaa1a9d3bc8 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 --- 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 1c97ba4e4e..ee9e75ca26 100644 --- a/pcbnew/router/pns_tool_base.cpp +++ b/pcbnew/router/pns_tool_base.cpp @@ -277,7 +277,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();