More improvements to drag tool selection disambiguation.

Fixes https://gitlab.com/kicad/code/kicad/issues/10745

(cherry picked from commit 2743fd583f)
This commit is contained in:
Jeff Young 2022-09-08 23:42:18 +01:00
parent 2faaa0a042
commit fc06192643
2 changed files with 7 additions and 2 deletions

View File

@ -290,8 +290,11 @@ int EDIT_TOOL::Drag( const TOOL_EVENT& aEvent )
sTool->FilterCollectorForFreePads( aCollector );
sTool->FilterCollectorForHierarchy( aCollector, true );
// drop a knee between two segments to a single segment, or a via with two
// segments attached to the via
if( aCollector.GetCount() > 1 )
sTool->GuessSelectionCandidates( aCollector, aPt );
// If we have a knee between two segments, or a via attached to two segments,
// then drop the selection to a single item.
static KICAD_T trackTypes[] = { PCB_VIA_T, PCB_TRACE_T, PCB_ARC_T, EOT };
std::vector<PCB_TRACK*> tracks;
std::vector<PCB_TRACK*> vias;

View File

@ -197,6 +197,8 @@ public:
PCB_GROUP* GetEnteredGroup() { return m_enteredGroup; }
PCB_LAYER_ID GetActiveLayer() { return m_frame->GetActiveLayer(); }
/**
* In general we don't want to select both a parent and any of it's children. This includes
* both footprints and their items, and groups and their members.