Make auto-wire use snapping behavior

Forcing grid snap for the kick-start behavior loses snaps to pins that
may be desired.  This also adds force-snapping in select mode to match
the user's auto-start preferences

Fixes https://gitlab.com/kicad/code/kicad/issues/7293
This commit is contained in:
Seth Hillbrand
2021-01-29 14:09:33 -08:00
parent 7a56608cd5
commit ea6dc0d730
2 changed files with 14 additions and 4 deletions
+9
View File
@@ -363,8 +363,12 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
newParams->quitOnDraw = true;
newEvt->SetParameter( newParams );
getViewControls()->ForceCursorPosition( true, snappedCursorPos );
newEvt->SetMousePosition( snappedCursorPos );
newEvt->SetHasPosition( true );
m_toolMgr->ProcessEvent( *newEvt );
continueSelect = false;
}
else if( collector[0]->IsHypertext() )
@@ -526,6 +530,7 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
&& collector[0]->IsPointClickableAnchor( (wxPoint) snappedCursorPos ) )
{
displayWireCursor = true;
getViewControls()->ForceCursorPosition( true, snappedCursorPos );
}
else if( collector[0]->IsHypertext()
&& !collector[0]->IsSelected()
@@ -535,6 +540,10 @@ int EE_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
}
}
}
else
{
getViewControls()->ForceCursorPosition( false );
}
}
else
{