From b682882807997c7fd4c47966841aca40a77386aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20W=C5=82ostowski?= Date: Thu, 27 Jul 2017 14:42:27 +0200 Subject: [PATCH] pcbnew: add keyboard shortcuts [1..9] to the selection disambiguation menu --- pcbnew/tools/selection_tool.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pcbnew/tools/selection_tool.cpp b/pcbnew/tools/selection_tool.cpp index b9e2e303e0..0db0be1bb5 100644 --- a/pcbnew/tools/selection_tool.cpp +++ b/pcbnew/tools/selection_tool.cpp @@ -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" ) );