KiCad PCB EDA Suite
Loading...
Searching...
No Matches
position_relative_tool.cpp File Reference

Go to the source code of this file.

Functions

static void moveSelectionBy (const PCB_SELECTION &aSelection, const VECTOR2I &aMoveVec, BOARD_COMMIT &aCommit, bool aAllowFreePads)
 Move each item in the selection by the given vector.
 

Function Documentation

◆ moveSelectionBy()

static void moveSelectionBy ( const PCB_SELECTION & aSelection,
const VECTOR2I & aMoveVec,
BOARD_COMMIT & aCommit,
bool aAllowFreePads )
static

Move each item in the selection by the given vector.

Pads that belong to footprints are promoted to their parent footprint so the whole footprint moves. A dedup set ensures each footprint is only moved once even when multiple of its pads are in the selection.

Parameters
[in]aSelectionis the selected objects to move.
[in]aMoveVecis the distance to move aSelection.
[in]aCommitis the commit object to handle undo/redo actions.
aAllowFreePadswhen true, pads are moved individually without promotion.

Definition at line 61 of file position_relative_tool.cpp.

References BOARD_ITEM::GetParent(), COMMIT::Modify(), BOARD_ITEM::Move(), moved, PCB_PAD_T, RECURSE, and EDA_ITEM::Type().

Referenced by POSITION_RELATIVE_TOOL::InteractiveOffset(), and POSITION_RELATIVE_TOOL::RelativeItemSelectionMove().