Move where flag is cleared to catch more cases

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9892
This commit is contained in:
Jon Evans 2021-12-08 20:46:53 -05:00
parent 44e01dcd0a
commit 587ee890d9
2 changed files with 4 additions and 3 deletions

View File

@ -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;

View File

@ -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 );
}
}