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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user