PCB Router: Pressing V again can untoggle Via

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12315
This commit is contained in:
Mike Williams 2022-08-31 10:43:40 -04:00
parent 565b815250
commit 68f71e4a62
1 changed files with 11 additions and 1 deletions

View File

@ -814,7 +814,17 @@ int ROUTER_TOOL::onLayerCommand( const TOOL_EVENT& aEvent )
int ROUTER_TOOL::onViaCommand( const TOOL_EVENT& aEvent ) int ROUTER_TOOL::onViaCommand( const TOOL_EVENT& aEvent )
{ {
return handleLayerSwitch( aEvent, true ); if( !m_router->IsPlacingVia() )
return handleLayerSwitch( aEvent, true );
else
{
m_router->ToggleViaPlacement();
frame()->SetActiveLayer( static_cast<PCB_LAYER_ID>( m_router->GetCurrentLayer() ) );
updateEndItem( aEvent );
m_router->Move( m_endSnapPoint, m_endItem );
}
return 0;
} }