From 587ee890d9e9e6cd047a951bc929564949915b53 Mon Sep 17 00:00:00 2001 From: Jon Evans Date: Wed, 8 Dec 2021 20:46:53 -0500 Subject: [PATCH] Move where flag is cleared to catch more cases Fixes https://gitlab.com/kicad/code/kicad/-/issues/9892 --- pcbnew/netlist_reader/netlist.cpp | 3 --- pcbnew/tools/edit_tool.cpp | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pcbnew/netlist_reader/netlist.cpp b/pcbnew/netlist_reader/netlist.cpp index 4440cbffdd..e938ab3107 100644 --- a/pcbnew/netlist_reader/netlist.cpp +++ b/pcbnew/netlist_reader/netlist.cpp @@ -114,10 +114,7 @@ void PCB_EDIT_FRAME::OnNetlistChanged( BOARD_NETLIST_UPDATER& aUpdater, bool* aR if( !newFootprints.empty() ) { for( FOOTPRINT* footprint : newFootprints ) - { - footprint->SetAttributes( footprint->GetAttributes() & ~FP_JUST_ADDED ); GetToolManager()->RunAction( PCB_ACTIONS::selectItem, true, footprint ); - } *aRunDragCommand = true; diff --git a/pcbnew/tools/edit_tool.cpp b/pcbnew/tools/edit_tool.cpp index 3bae1d0f42..fd77cd5ab6 100644 --- a/pcbnew/tools/edit_tool.cpp +++ b/pcbnew/tools/edit_tool.cpp @@ -764,6 +764,10 @@ int EDIT_TOOL::doMoveSelection( TOOL_EVENT aEvent, bool aPickReference ) { for( PAD* pad : footprint->Pads() ) sel_items.push_back( pad ); + + // Clear this flag here; it will be set by the netlist updater if the footprint is new + // so that it was skipped in the initial connectivity update in OnNetlistChanged + footprint->SetAttributes( footprint->GetAttributes() & ~FP_JUST_ADDED ); } }