Honour prime-event-location when starting router.

Fixes https://gitlab.com/kicad/code/kicad/issues/11239

(cherry picked from commit a54bbfe12b)
This commit is contained in:
Jeff Young 2022-03-29 13:43:00 +01:00
parent 1adfca8f2d
commit e21f0ec9fb
1 changed files with 2 additions and 1 deletions

View File

@ -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();