pcbnew: Fix cursor position after via layer select

CHANGED: Move cursor to event position instead of the
dialog position when selecting the via layer
This commit is contained in:
Ian McInerney 2019-11-10 17:34:16 +00:00
parent 9c33620a0f
commit d8c80623ce
1 changed files with 3 additions and 0 deletions

View File

@ -540,6 +540,9 @@ int ROUTER_TOOL::onViaCommand( const TOOL_EVENT& aEvent )
targetLayer = frame()->SelectLayer( static_cast<PCB_LAYER_ID>( currentLayer ),
LSET::AllNonCuMask(), dlgPosition );
// Reset the cursor to the position where the event occured
controls()->SetCursorPosition( aEvent.HasPosition() ? aEvent.Position() : dlgPosition );
}
// fixme: P&S supports more than one fixed layer pair. Update the dialog?