diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp index f2c5dd8cca..b24fde03ff 100644 --- a/pcbnew/collectors.cpp +++ b/pcbnew/collectors.cpp @@ -134,6 +134,14 @@ const KICAD_T GENERAL_COLLECTOR::Tracks[] = { }; +const KICAD_T GENERAL_COLLECTOR::LockableItems[] = { + PCB_MODULE_T, + PCB_TRACE_T, + PCB_VIA_T, + EOT +}; + + const KICAD_T GENERAL_COLLECTOR::Zones[] = { PCB_ZONE_AREA_T, EOT diff --git a/pcbnew/collectors.h b/pcbnew/collectors.h index baece4df00..f1cdd59a47 100644 --- a/pcbnew/collectors.h +++ b/pcbnew/collectors.h @@ -304,6 +304,11 @@ public: */ static const KICAD_T Tracks[]; + /** + * A scan list for TRACKS, VIAS, MODULES + */ + static const KICAD_T LockableItems[]; + /** * Constructor GENERALCOLLECTOR */ diff --git a/pcbnew/tools/pcb_editor_control.cpp b/pcbnew/tools/pcb_editor_control.cpp index d2102cc3d1..ca47dab1e0 100644 --- a/pcbnew/tools/pcb_editor_control.cpp +++ b/pcbnew/tools/pcb_editor_control.cpp @@ -311,7 +311,7 @@ bool PCB_EDITOR_CONTROL::Init() SELECTION_CONDITIONS::OnlyType( PCB_ZONE_AREA_T ) ); menu.AddMenu( lockMenu.get(), false, - SELECTION_CONDITIONS::OnlyTypes( GENERAL_COLLECTOR::Tracks ) ); + SELECTION_CONDITIONS::OnlyTypes( GENERAL_COLLECTOR::LockableItems ) ); } DRAWING_TOOL* drawingTool = m_toolMgr->GetTool();