diff --git a/pcbnew/tools/pcb_selection_tool.cpp b/pcbnew/tools/pcb_selection_tool.cpp index 187ef8ec1d..f744420fb0 100644 --- a/pcbnew/tools/pcb_selection_tool.cpp +++ b/pcbnew/tools/pcb_selection_tool.cpp @@ -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( aItem ); + + if( marker && marker->IsExcluded() && !board()->IsElementVisible( LAYER_DRC_EXCLUSION ) ) + return false; + + break; + // These are not selectable case PCB_NETINFO_T: case NOT_USED: