From d3b50f060718e7017e27df77d8575599f8757308 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 10 Oct 2023 13:42:42 +0100 Subject: [PATCH] Cleanup (no functional changes). --- pcbnew/tools/edit_tool_move_fct.cpp | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/pcbnew/tools/edit_tool_move_fct.cpp b/pcbnew/tools/edit_tool_move_fct.cpp index df14bea881..dec741c743 100644 --- a/pcbnew/tools/edit_tool_move_fct.cpp +++ b/pcbnew/tools/edit_tool_move_fct.cpp @@ -542,22 +542,10 @@ bool EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, BOARD_COMMIT* aCommit // Drag items to the current cursor position for( EDA_ITEM* item : sel_items ) { - // Don't double move footprint pads, fields, etc. - // - // For PCB_GROUP_T, we make sure the selection includes only the top level - // group and not its descendants. + // Don't double move child items. if( !item->GetParent() || !item->GetParent()->IsSelected() ) static_cast( item )->Move( movement ); - if( !redraw3D && item->Type() == PCB_FOOTPRINT_T ) - redraw3D = true; - } - - if( redraw3D && allowRedraw3D ) - editFrame->Update3DView( false, true ); - - for( BOARD_ITEM* item : sel_items ) - { if( item->Type() == PCB_GENERATOR_T ) { PCB_GENERATOR* generator = static_cast( item ); @@ -565,8 +553,15 @@ bool EDIT_TOOL::doMoveSelection( const TOOL_EVENT& aEvent, BOARD_COMMIT* aCommit m_toolMgr->RunSynchronousAction( PCB_ACTIONS::genUpdateEdit, aCommit, generator ); } + else if( item->Type() == PCB_FOOTPRINT_T ) + { + redraw3D = true; + } } + if( redraw3D && allowRedraw3D ) + editFrame->Update3DView( false, true ); + if( showCourtyardConflicts && drc_on_move->m_FpInMove.size() ) { drc_on_move->Run();