PNS: Allow committing routes even when cursor moves beyond valid solution

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6651
This commit is contained in:
Jon Evans 2020-12-27 17:14:38 -05:00
parent 1fc4523711
commit 3c87e67753
1 changed files with 16 additions and 2 deletions

View File

@ -530,9 +530,23 @@ bool DRAGGER::FixRoute()
if( node )
{
// Collisions still prevent fixing unless "Allow DRC violations" is checked
// If collisions exist, we can fix in shove/smart mode because all tracks to be committed
// will be in valid positions (even if the current routing solution to the mouse cursor is
// invalid). In other modes, we can only commit if "Allow DRC violations" is enabled.
if( !m_dragStatus )
{
switch( m_currentMode )
{
case RM_Shove:
case RM_Smart:
break;
case RM_Walkaround:
default:
if( !Settings().CanViolateDRC() )
return false;
}
}
Router()->CommitRouting( node );
return true;