More improvements to drag tool selection disambiguation.

Fixes https://gitlab.com/kicad/code/kicad/issues/10745
This commit is contained in:
Jeff Young 2022-09-08 23:42:18 +01:00
parent d030f03844
commit 2743fd583f
2 changed files with 7 additions and 2 deletions

View File

@ -305,8 +305,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.
std::initializer_list<KICAD_T> trackTypes = { PCB_TRACE_T, PCB_ARC_T };
std::vector<PCB_TRACK*> tracks;
std::vector<PCB_TRACK*> vias;

View File

@ -187,6 +187,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.