Allow selecting more items for highlighting

This commit is contained in:
Jon Evans 2019-04-07 21:57:45 -04:00
parent c07de84c05
commit 2162b53d72
1 changed files with 22 additions and 7 deletions

View File

@ -961,16 +961,31 @@ int SCH_SCREEN::GetNode( const wxPoint& aPosition, EDA_ITEMS& aList )
{
for( SCH_ITEM* item = m_drawList.begin(); item; item = item->Next() )
{
if( ( item->Type() == SCH_LINE_T || item->Type() == SCH_BUS_WIRE_ENTRY_T ||
item->Type() == SCH_BUS_BUS_ENTRY_T )
&& item->HitTest( aPosition )
&& (item->GetLayer() == LAYER_BUS || item->GetLayer() == LAYER_WIRE) )
switch( item->Type() )
{
aList.push_back( item );
case SCH_LINE_T:
case SCH_BUS_WIRE_ENTRY_T:
case SCH_BUS_BUS_ENTRY_T:
{
if( item->HitTest( aPosition ) &&
( item->GetLayer() == LAYER_BUS || item->GetLayer() == LAYER_WIRE ) )
aList.push_back( item );
break;
}
else if( item->Type() == SCH_JUNCTION_T && item->HitTest( aPosition ) )
case SCH_LABEL_T:
case SCH_HIERARCHICAL_LABEL_T:
case SCH_GLOBAL_LABEL_T:
case SCH_SHEET_PIN_T:
case SCH_JUNCTION_T:
{
aList.push_back( item );
if( item->HitTest( aPosition ) )
aList.push_back( item );
break;
}
default:
break;
}
}