Honour prime-event-location when starting router.

Fixes https://gitlab.com/kicad/code/kicad/issues/11239
This commit is contained in:
Jeff Young 2022-03-29 13:43:00 +01:00
parent 719874fe9c
commit a54bbfe12b
1 changed files with 2 additions and 1 deletions

View File

@ -277,7 +277,8 @@ bool TOOL_BASE::checkSnap( ITEM *aItem )
void TOOL_BASE::updateStartItem( const TOOL_EVENT& aEvent, bool aIgnorePads ) void TOOL_BASE::updateStartItem( const TOOL_EVENT& aEvent, bool aIgnorePads )
{ {
int tl = getView()->GetTopLayer(); 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; VECTOR2I p;
GAL* gal = m_toolMgr->GetView()->GetGAL(); GAL* gal = m_toolMgr->GetView()->GetGAL();