From a1bcc4ba1eaae3ff4ae0a4fe28e771036c5a0010 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 22 Sep 2018 15:16:01 +0100 Subject: [PATCH] Don't start dragging until Update PCB dialog has been closed. Fixes: lp:1793828 * https://bugs.launchpad.net/kicad/+bug/1793828 --- pcbnew/cross-probing.cpp | 6 ++++++ pcbnew/dialogs/dialog_update_pcb.cpp | 8 +------- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index 30aecc1a09..61ba150f19 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -405,6 +405,12 @@ void PCB_EDIT_FRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) { DIALOG_UPDATE_PCB updateDialog( this, &netlist ); updateDialog.ShowModal(); + + auto selectionTool = static_cast( + m_toolManager->FindTool( "pcbnew.InteractiveSelection" ) ); + + if( !selectionTool->GetSelection().Empty() ) + GetToolManager()->InvokeTool( "pcbnew.InteractiveEdit" ); } break; diff --git a/pcbnew/dialogs/dialog_update_pcb.cpp b/pcbnew/dialogs/dialog_update_pcb.cpp index 7e8b3465f6..3c1b29f247 100644 --- a/pcbnew/dialogs/dialog_update_pcb.cpp +++ b/pcbnew/dialogs/dialog_update_pcb.cpp @@ -106,11 +106,7 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun ) // outside the existinag board EDA_RECT bbox = board->GetBoundingBox(); - if( !aDryRun ) - { - // Clear selection, just in case a selected item has to be removed - toolManager->RunAction( PCB_ACTIONS::selectionClear, true ); - } + toolManager->RunAction( PCB_ACTIONS::selectionClear, true ); m_netlist->SetDeleteExtraFootprints( m_cbDeleteExtraFootprints->GetValue() ); m_netlist->SetFindByTimeStamp( m_matchByTimestamp->GetSelection() == 0 ); @@ -162,8 +158,6 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun ) { for( MODULE* footprint : newFootprints ) toolManager->RunAction( PCB_ACTIONS::selectItem, true, footprint ); - - toolManager->InvokeTool( "pcbnew.InteractiveEdit" ); } }