From d66cc0fedc2ecb674ca20ef17de5e0f085b55b89 Mon Sep 17 00:00:00 2001 From: Jon Neal Date: Thu, 17 Mar 2016 23:09:24 -0400 Subject: [PATCH] Fix one click dialog footprint spreading picking up extra footprints. --- pcbnew/dialogs/dialog_update_pcb.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pcbnew/dialogs/dialog_update_pcb.cpp b/pcbnew/dialogs/dialog_update_pcb.cpp index 56d4024912..3a399f0cdd 100644 --- a/pcbnew/dialogs/dialog_update_pcb.cpp +++ b/pcbnew/dialogs/dialog_update_pcb.cpp @@ -110,11 +110,14 @@ void DIALOG_UPDATE_PCB::PerformUpdate( bool aDryRun ) { m_frame->SpreadFootprints( &newFootprints, false, false ); - BOOST_FOREACH( MODULE* footprint, newFootprints ) + if( !newFootprints.empty() ) { - toolManager->RunAction( COMMON_ACTIONS::selectItem, true, footprint ); + BOOST_FOREACH( MODULE* footprint, newFootprints ) + { + toolManager->RunAction( COMMON_ACTIONS::selectItem, true, footprint ); + } + toolManager->InvokeTool( "pcbnew.InteractiveEdit" ); } - toolManager->InvokeTool( "pcbnew.InteractiveEdit" ); }