From 65c9170b4683194aadc064da464ad08dbcdd5836 Mon Sep 17 00:00:00 2001 From: Mike Williams Date: Mon, 20 Sep 2021 15:20:41 -0400 Subject: [PATCH] Pcbnew: Clear tool and selection before updating PCB from schematic Fixes https://gitlab.com/kicad/code/kicad/-/issues/9196 --- pcbnew/dialogs/dialog_update_pcb.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/dialogs/dialog_update_pcb.cpp b/pcbnew/dialogs/dialog_update_pcb.cpp index 4e38b58b26..e15d617c62 100644 --- a/pcbnew/dialogs/dialog_update_pcb.cpp +++ b/pcbnew/dialogs/dialog_update_pcb.cpp @@ -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 );