pcbnew: add keyboard shortcuts [1..9] to the selection disambiguation menu

This commit is contained in:
Tomasz Włostowski 2017-07-27 14:42:27 +02:00
parent b964569db7
commit b682882807
1 changed files with 4 additions and 2 deletions

View File

@ -1262,14 +1262,16 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector )
getView()->Add( &brightBox );
int limit = std::min( 10, aCollector->GetCount() );
int limit = std::min( 9, aCollector->GetCount() );
for( int i = 0; i < limit; ++i )
{
wxString text;
BOARD_ITEM* item = ( *aCollector )[i];
text = item->GetSelectMenuText();
menu.Add( text, i + 1 );
wxString menuText = wxString::Format("&%d. %s", i + 1, text );
menu.Add( menuText, i + 1 );
}
menu.SetTitle( _( "Clarify selection" ) );