Adding locking to the context menu for modules
Locking submenu was activated only for tracks and via but it makes sense (and is probably expected) when right-clicking on modules as well.
This commit is contained in:
parent
73eab29802
commit
76d3b6f04a
|
@ -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
|
||||
|
|
|
@ -304,6 +304,11 @@ public:
|
|||
*/
|
||||
static const KICAD_T Tracks[];
|
||||
|
||||
/**
|
||||
* A scan list for TRACKS, VIAS, MODULES
|
||||
*/
|
||||
static const KICAD_T LockableItems[];
|
||||
|
||||
/**
|
||||
* Constructor GENERALCOLLECTOR
|
||||
*/
|
||||
|
|
|
@ -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<DRAWING_TOOL>();
|
||||
|
|
Loading…
Reference in New Issue