Run disambiguation if there are multiple preferred items.

This didn't really come up before tables, but any cell selection
will also include its parent table.
This commit is contained in:
Jeff Young 2024-03-11 17:31:14 +00:00
parent ccfefc3971
commit 5ccd11d426
1 changed files with 4 additions and 1 deletions

View File

@ -3501,7 +3501,8 @@ void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector
for( BOARD_ITEM* item : preferred )
aCollector.Append( item );
return;
if( preferred.size() == 1 )
return;
}
// Prefer exact hits to sloppy ones
@ -3633,8 +3634,10 @@ void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector
}
if( haveItemOnActive )
{
for( BOARD_ITEM* item : rejected )
aCollector.Transfer( item );
}
}
}