Show more than 9 items in disambiguation menu.
(But only the first 9 get hotkeys.) Fixes https://gitlab.com/kicad/code/kicad/issues/11966
This commit is contained in:
parent
b759d860c0
commit
4685dc49cc
|
@ -1674,16 +1674,28 @@ bool EE_SELECTION_TOOL::doSelectionMenu( EE_COLLECTOR* aCollector )
|
||||||
|
|
||||||
expandSelection = false;
|
expandSelection = false;
|
||||||
|
|
||||||
int limit = std::min( 9, aCollector->GetCount() );
|
int limit = std::min( 100, aCollector->GetCount() );
|
||||||
ACTION_MENU menu( true );
|
ACTION_MENU menu( true );
|
||||||
|
|
||||||
for( int i = 0; i < limit; ++i )
|
for( int i = 0; i < limit; ++i )
|
||||||
{
|
{
|
||||||
wxString text;
|
|
||||||
EDA_ITEM* item = ( *aCollector )[i];
|
EDA_ITEM* item = ( *aCollector )[i];
|
||||||
text = item->GetSelectMenuText( m_frame->GetUserUnits() );
|
wxString text = item->GetSelectMenuText( m_frame->GetUserUnits() );
|
||||||
|
wxString menuText;
|
||||||
|
|
||||||
|
if( i < 9 )
|
||||||
|
{
|
||||||
|
#ifdef __WXMAC__
|
||||||
|
menuText = wxString::Format( "%s\t%d", text, i + 1 );
|
||||||
|
#else
|
||||||
|
menuText = wxString::Format( "&%d %s\t%d", i + 1, text, i + 1 );
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
menuText = text;
|
||||||
|
}
|
||||||
|
|
||||||
wxString menuText = wxString::Format( "&%d. %s\t%d", i + 1, text, i + 1 );
|
|
||||||
menu.Add( menuText, i + 1, item->GetMenuImage() );
|
menu.Add( menuText, i + 1, item->GetMenuImage() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue