PCB_SELECTION_TOOL::selectPoint() Remove items disabled by the selection filter
before using any other filter. This avoid to select an item from the candidate list that cannot be selected and eliminate another candidate. Fixes #16755 https://gitlab.com/kicad/code/kicad/-/issues/16755
This commit is contained in:
parent
fb8f05fb34
commit
89f8c5d918
|
@ -2,7 +2,7 @@
|
||||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013-2017 CERN
|
* Copyright (C) 2013-2017 CERN
|
||||||
* Copyright (C) 2018-2023 KiCad Developers, see AUTHORS.txt for contributors.
|
* Copyright (C) 2018-2024 KiCad Developers, see AUTHORS.txt for contributors.
|
||||||
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch>
|
||||||
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
* @author Maciej Suminski <maciej.suminski@cern.ch>
|
||||||
*
|
*
|
||||||
|
@ -752,6 +752,9 @@ bool PCB_SELECTION_TOOL::selectPoint( const VECTOR2I& aWhere, bool aOnDrag,
|
||||||
|
|
||||||
m_selection.ClearReferencePoint();
|
m_selection.ClearReferencePoint();
|
||||||
|
|
||||||
|
// Apply the stateful filter (remove items disabled by the Selection Filter)
|
||||||
|
FilterCollectedItems( collector, false );
|
||||||
|
|
||||||
// Allow the client to do tool- or action-specific filtering to see if we can get down
|
// Allow the client to do tool- or action-specific filtering to see if we can get down
|
||||||
// to a single item
|
// to a single item
|
||||||
if( aClientFilter )
|
if( aClientFilter )
|
||||||
|
@ -759,9 +762,6 @@ bool PCB_SELECTION_TOOL::selectPoint( const VECTOR2I& aWhere, bool aOnDrag,
|
||||||
|
|
||||||
FilterCollectorForHierarchy( collector, false );
|
FilterCollectorForHierarchy( collector, false );
|
||||||
|
|
||||||
// Apply the stateful filter
|
|
||||||
FilterCollectedItems( collector, false );
|
|
||||||
|
|
||||||
FilterCollectorForFootprints( collector, aWhere );
|
FilterCollectorForFootprints( collector, aWhere );
|
||||||
|
|
||||||
// For subtracting, we only want items that are selected
|
// For subtracting, we only want items that are selected
|
||||||
|
|
Loading…
Reference in New Issue