Do not allow selection of excluded DRC markers when they are not visible.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21265

(cherry picked from commit 718b7e744a)
This commit is contained in:
Wayne Stambaugh
2025-07-13 18:13:16 -04:00
parent 777b731687
commit 3bcf0a438a
+9
View File
@@ -2929,6 +2929,7 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
const PAD* pad = nullptr;
const PCB_TEXT* text = nullptr;
const PCB_FIELD* field = nullptr;
const PCB_MARKER* marker = nullptr;
// Most footprint children can only be selected in the footprint editor.
if( aItem->GetParentFootprint() && !m_isFootprintEditor && !checkVisibilityOnly )
@@ -3083,6 +3084,14 @@ bool PCB_SELECTION_TOOL::Selectable( const BOARD_ITEM* aItem, bool checkVisibili
break;
case PCB_MARKER_T:
marker = static_cast<const PCB_MARKER*>( aItem );
if( marker && marker->IsExcluded() && !board()->IsElementVisible( LAYER_DRC_EXCLUSION ) )
return false;
break;
// These are not selectable
case PCB_NETINFO_T:
case NOT_USED: