diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index c6734596b5..bfb8d479ca 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -2,7 +2,7 @@ * This program source code file is part of KiCad, a free EDA CAD application. * * 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 * @author Maciej Suminski * @@ -752,6 +752,9 @@ bool PCB_SELECTION_TOOL::selectPoint( const VECTOR2I& aWhere, bool aOnDrag, 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 // to a single item if( aClientFilter ) @@ -759,9 +762,6 @@ bool PCB_SELECTION_TOOL::selectPoint( const VECTOR2I& aWhere, bool aOnDrag, FilterCollectorForHierarchy( collector, false ); - // Apply the stateful filter - FilterCollectedItems( collector, false ); - FilterCollectorForFootprints( collector, aWhere ); // For subtracting, we only want items that are selected