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

This commit is contained in:
Maciej Suminski 2014-07-09 13:50:27 +02:00
parent 8e90a6167b
commit 6d1417bafa
4 changed files with 20 additions and 5 deletions

View File

@ -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, PCB_MODULE_T,
EOT 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[] = { const KICAD_T GENERAL_COLLECTOR::Tracks[] = {
PCB_TRACE_T, PCB_TRACE_T,
PCB_VIA_T, PCB_VIA_T,
EOT EOT
}; };
const KICAD_T GENERAL_COLLECTOR::Zones[] = { const KICAD_T GENERAL_COLLECTOR::Zones[] = {
PCB_ZONE_AREA_T, PCB_ZONE_AREA_T,
EOT EOT

View File

@ -262,7 +262,7 @@ public:
/** /**
* A scan list for only MODULEs * 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[]; static const KICAD_T ModulesAndTheirItems[];
/**
* A scan list for primary module items.
*/
static const KICAD_T ModuleItems[];
/** /**
* A scan list for only TRACKS * A scan list for only TRACKS
*/ */

View File

@ -119,7 +119,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
else if( GetToolId() == ID_NO_TOOL_SELECTED ) else if( GetToolId() == ID_NO_TOOL_SELECTED )
{ {
if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) ) if( m_mainToolBar->GetToolToggled( ID_TOOLBARH_PCB_MODE_MODULE ) )
scanList = GENERAL_COLLECTOR::ModuleItems; scanList = GENERAL_COLLECTOR::Modules;
else else
scanList = (DisplayOpt.DisplayZonesMode == 0) ? scanList = (DisplayOpt.DisplayZonesMode == 0) ?
GENERAL_COLLECTOR::AllBoardItems : GENERAL_COLLECTOR::AllBoardItems :
@ -138,7 +138,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode )
break; break;
case ID_PCB_MODULE_BUTT: case ID_PCB_MODULE_BUTT:
scanList = GENERAL_COLLECTOR::ModuleItems; scanList = GENERAL_COLLECTOR::Modules;
break; break;
case ID_PCB_ZONES_BUTT: case ID_PCB_ZONES_BUTT:

View File

@ -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 const KICAD_T types[] = { PCB_TRACE_T, PCB_VIA_T, PCB_LINE_T, EOT }; // preferred types
if( m_editModules ) if( m_editModules )
collector.Collect( getModel<BOARD>(), GENERAL_COLLECTOR::ModulesAndTheirItems, collector.Collect( getModel<BOARD>(), GENERAL_COLLECTOR::ModuleItems,
wxPoint( aWhere.x, aWhere.y ), guide ); wxPoint( aWhere.x, aWhere.y ), guide );
else else
collector.Collect( getModel<BOARD>(), GENERAL_COLLECTOR::AllBoardItems, collector.Collect( getModel<BOARD>(), GENERAL_COLLECTOR::AllBoardItems,