Router, place via: fix issue created by 45b2bc: cancelling via must be made

only when the select layer is called.
Fixes #7606
https://gitlab.com/kicad/code/kicad/issues/7606
This commit is contained in:
jean-pierre charras 2021-02-19 17:28:20 +01:00
parent 9cc2781d55
commit d0b91b1106
1 changed files with 3 additions and 3 deletions

View File

@ -758,11 +758,11 @@ int ROUTER_TOOL::handleLayerSwitch( const TOOL_EVENT& aEvent, bool aForceVia )
// Reset the cursor to the end of the track
controls()->SetCursorPosition( m_endSnapPoint );
}
}
if( targetLayer == UNDEFINED_LAYER )
if( targetLayer == UNDEFINED_LAYER ) // cancelled by user
return 0;
}
}
// fixme: P&S supports more than one fixed layer pair. Update the dialog?
sizes.ClearLayerPairs();