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 &commit)
 Move each item in the selection by the given vector.
 
static void positionRelativeClientSelectionFilter (const VECTOR2I &aPt, GENERAL_COLLECTOR &aCollector, PCB_SELECTION_TOOL *sTool)
 Position relative tools all use the same filter for selecting items.
 

Function Documentation

◆ moveSelectionBy()

static void moveSelectionBy ( const PCB_SELECTION aSelection,
const VECTOR2I aMoveVec,
BOARD_COMMIT commit 
)
static

Move each item in the selection by the given vector.

If any pads are part of a footprint, the whole footprint is moved.

Definition at line 56 of file position_relative_tool.cpp.

References COMMIT::Modify(), and BOARD_ITEM::Move().

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

◆ positionRelativeClientSelectionFilter()

static void positionRelativeClientSelectionFilter ( const VECTOR2I aPt,
GENERAL_COLLECTOR aCollector,
PCB_SELECTION_TOOL sTool 
)
static