Disable snap when moving with keyboard
Keyboard movement is for precision control, so avoid snapping behavior
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21235
(cherry picked from commit 9e326c29db)
This commit is contained in:
@@ -493,16 +493,13 @@ bool EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, BOARD_COMMIT* aCommit
|
||||
|
||||
if( controls->GetSettings().m_lastKeyboardCursorPositionValid )
|
||||
{
|
||||
long action = controls->GetSettings().m_lastKeyboardCursorCommand;
|
||||
|
||||
// The arrow keys are by definition SINGLE AXIS. Do not allow the other
|
||||
// axis to be snapped to the grid.
|
||||
if( action == ACTIONS::CURSOR_LEFT || action == ACTIONS::CURSOR_RIGHT )
|
||||
m_cursor.y = prevPos.y;
|
||||
else if( action == ACTIONS::CURSOR_UP || action == ACTIONS::CURSOR_DOWN )
|
||||
m_cursor.x = prevPos.x;
|
||||
grid.SetSnap( false );
|
||||
grid.SetUseGrid( false );
|
||||
}
|
||||
|
||||
m_cursor = grid.BestSnapAnchor( mousePos, layers,
|
||||
grid.GetSelectionGrid( selection ), sel_items );
|
||||
|
||||
if( !selection.HasReferencePoint() )
|
||||
originalPos = m_cursor;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user