Commit 6d1417ba authored by Maciej Suminski's avatar Maciej Suminski

SELECTION_TOOL in edit module mode does not try to select MODULEs.

parent 8e90a616
......@@ -86,7 +86,7 @@ const KICAD_T GENERAL_COLLECTOR::AllButZones[] = {
};
const KICAD_T GENERAL_COLLECTOR::ModuleItems[] = {
const KICAD_T GENERAL_COLLECTOR::Modules[] = {
PCB_MODULE_T,
EOT
};
......@@ -118,12 +118,21 @@ const KICAD_T GENERAL_COLLECTOR::ModulesAndTheirItems[] = {
};
const KICAD_T GENERAL_COLLECTOR::ModuleItems[] = {
PCB_MODULE_TEXT_T,
PCB_MODULE_EDGE_T,
PCB_PAD_T,
EOT
};
const KICAD_T GENERAL_COLLECTOR::Tracks[] = {
PCB_TRACE_T,
PCB_VIA_T,
EOT
};
const KICAD_T GENERAL_COLLECTOR::Zones[] = {
PCB_ZONE_AREA_T,
EOT
......
......@@ -262,7 +262,7 @@ public:
/**
* A scan list for only MODULEs
*/
static const KICAD_T ModuleItems[];
static const KICAD_T Modules[];
/**
......@@ -282,6 +282,12 @@ public:
static const KICAD_T ModulesAndTheirItems[];
/**
* A scan list for primary module items.
*/
static const KICAD_T ModuleItems[];
/**
* A scan list for only TRACKS
*/
......
......@@ -119,7 +119,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
else if( GetToolId() == ID_NO_TOOL_SELECTED )
{
if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) )
scanList = GENERAL_COLLECTOR::ModuleItems;
scanList = GENERAL_COLLECTOR::Modules;
else
scanList = (DisplayOpt.DisplayZonesMode == 0) ?
GENERAL_COLLECTOR::AllBoardItems :
......@@ -138,7 +138,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
break;
case ID_PCB_MODULE_BUTT:
scanList = GENERAL_COLLECTOR::ModuleItems;
scanList = GENERAL_COLLECTOR::Modules;
break;
case ID_PCB_ZONES_BUTT:
......
......@@ -234,7 +234,7 @@ bool SELECTION_TOOL::selectSingle( const VECTOR2I& aWhere, bool aAllowDisambigua
const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T, EOT }; // preferred types
if( m_editModules )
collector.Collect( getModel<BOARD>(), GENERAL_COLLECTOR::ModulesAndTheirItems,
collector.Collect( getModel<BOARD>(), GENERAL_COLLECTOR::ModuleItems,
wxPoint( aWhere.x, aWhere.y ), guide );
else
collector.Collect( getModel<BOARD>(), GENERAL_COLLECTOR::AllBoardItems,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment