From 896bd3945dd5deb8f7231d561757bd52eedb44a6 Mon Sep 17 00:00:00 2001 From: Jon Neal Date: Mon, 1 Feb 2016 19:43:28 -0500 Subject: [PATCH] pcbnew: netlist import interactive edit fix When importing a netlist with no changes, do not select the part under the cursor. --- pcbnew/netlist.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 76bc3044ed..a075b95cb0 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -123,12 +123,14 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, if( IsGalCanvasActive() ) { SpreadFootprints( &newFootprints, false, false ); - - BOOST_FOREACH( MODULE* footprint, newFootprints ) + if( !newFootprints.empty() ) { - m_toolManager->RunAction( COMMON_ACTIONS::selectItem, true, footprint ); + BOOST_FOREACH( MODULE* footprint, newFootprints ) + { + m_toolManager->RunAction( COMMON_ACTIONS::selectItem, true, footprint ); + } + m_toolManager->InvokeTool( "pcbnew.InteractiveEdit" ); } - m_toolManager->InvokeTool( "pcbnew.InteractiveEdit" ); } OnModify(); @@ -327,4 +329,4 @@ void PCB_EDIT_FRAME::LoadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) if( loadFootprint && module != NULL ) component->SetModule( module ); } -} \ No newline at end of file +}