From 15fd0aa989126f676dc685f35a3b55353eaf3481 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 20 Feb 2022 16:10:25 +0000 Subject: [PATCH] Disable grid when ctrl/cmd key is down. Fixes https://gitlab.com/kicad/code/kicad/issues/9995 --- eeschema/tools/symbol_editor_move_tool.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eeschema/tools/symbol_editor_move_tool.cpp b/eeschema/tools/symbol_editor_move_tool.cpp index 20caf6a45b..97a161197c 100644 --- a/eeschema/tools/symbol_editor_move_tool.cpp +++ b/eeschema/tools/symbol_editor_move_tool.cpp @@ -122,7 +122,7 @@ int SYMBOL_EDITOR_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) if( !selection.Front()->IsNew() ) saveCopyInUndoList( m_frame->GetCurSymbol(), UNDO_REDO::LIBEDIT ); - m_cursor = controls->GetCursorPosition(); + m_cursor = controls->GetCursorPosition( !aEvent.DisableGridSnapping() ); // Main loop: keep receiving events do @@ -188,7 +188,7 @@ int SYMBOL_EDITOR_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) // Set up the starting position and move/drag offset // - m_cursor = controls->GetCursorPosition(); + m_cursor = controls->GetCursorPosition( !evt->DisableGridSnapping() ); if( lib_item->IsNew() ) { @@ -214,7 +214,7 @@ int SYMBOL_EDITOR_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) } else { - m_cursor = getViewControls()->GetCursorPosition( true ); + m_cursor = controls->GetCursorPosition( !evt->DisableGridSnapping() ); m_anchorPos = m_cursor; } @@ -229,7 +229,7 @@ int SYMBOL_EDITOR_MOVE_TOOL::Main( const TOOL_EVENT& aEvent ) //------------------------------------------------------------------------ // Follow the mouse // - m_cursor = controls->GetCursorPosition(); + m_cursor = controls->GetCursorPosition( !evt->DisableGridSnapping() ); VECTOR2I delta( m_cursor - prevPos ); m_anchorPos = m_cursor;