Disable grid when ctrl/cmd key is down.

Fixes https://gitlab.com/kicad/code/kicad/issues/9995
This commit is contained in:
Jeff Young 2022-02-20 16:10:25 +00:00
parent 246b6fcdd6
commit 15fd0aa989
1 changed files with 4 additions and 4 deletions

View File

@ -122,7 +122,7 @@ int SYMBOL_EDITOR_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
if( !selection.Front()->IsNew() ) if( !selection.Front()->IsNew() )
saveCopyInUndoList( m_frame->GetCurSymbol(), UNDO_REDO::LIBEDIT ); saveCopyInUndoList( m_frame->GetCurSymbol(), UNDO_REDO::LIBEDIT );
m_cursor = controls->GetCursorPosition(); m_cursor = controls->GetCursorPosition( !aEvent.DisableGridSnapping() );
// Main loop: keep receiving events // Main loop: keep receiving events
do do
@ -188,7 +188,7 @@ int SYMBOL_EDITOR_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
// Set up the starting position and move/drag offset // Set up the starting position and move/drag offset
// //
m_cursor = controls->GetCursorPosition(); m_cursor = controls->GetCursorPosition( !evt->DisableGridSnapping() );
if( lib_item->IsNew() ) if( lib_item->IsNew() )
{ {
@ -214,7 +214,7 @@ int SYMBOL_EDITOR_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
} }
else else
{ {
m_cursor = getViewControls()->GetCursorPosition( true ); m_cursor = controls->GetCursorPosition( !evt->DisableGridSnapping() );
m_anchorPos = m_cursor; m_anchorPos = m_cursor;
} }
@ -229,7 +229,7 @@ int SYMBOL_EDITOR_MOVE_TOOL::Main( const TOOL_EVENT& aEvent )
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// Follow the mouse // Follow the mouse
// //
m_cursor = controls->GetCursorPosition(); m_cursor = controls->GetCursorPosition( !evt->DisableGridSnapping() );
VECTOR2I delta( m_cursor - prevPos ); VECTOR2I delta( m_cursor - prevPos );
m_anchorPos = m_cursor; m_anchorPos = m_cursor;