Pcbnew: Clear tool and selection before updating PCB from schematic

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9196
This commit is contained in:
Mike Williams 2021-09-20 15:20:41 -04:00 committed by Seth Hillbrand
parent 91e456113f
commit 65c9170b46
1 changed files with 6 additions and 0 deletions

View File

@ -99,6 +99,12 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun )
m_netlist->SetFindByTimeStamp( !m_cbRelinkFootprints->GetValue() );
m_netlist->SetReplaceFootprints( m_cbUpdateFootprints->GetValue() );
if( !aDryRun )
{
m_frame->GetToolManager()->DeactivateTool();
m_frame->GetToolManager()->RunAction( PCB_ACTIONS::selectionClear, true );
}
BOARD_NETLIST_UPDATER updater( m_frame, m_frame->GetBoard() );
updater.SetReporter ( &reporter );
updater.SetIsDryRun( aDryRun );