wxWidgets under OS X require wxMenuItem ids to be >0.
This commit is contained in:
parent
6fc59f9acd
commit
01c9f09833
|
@ -726,7 +726,7 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector )
|
||||||
wxString text;
|
wxString text;
|
||||||
BOARD_ITEM* item = ( *aCollector )[i];
|
BOARD_ITEM* item = ( *aCollector )[i];
|
||||||
text = item->GetSelectMenuText();
|
text = item->GetSelectMenuText();
|
||||||
menu.Add( text, i );
|
menu.Add( text, i + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
menu.SetTitle( _( "Clarify selection" ) );
|
menu.SetTitle( _( "Clarify selection" ) );
|
||||||
|
@ -742,9 +742,9 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector )
|
||||||
int id = *evt->GetCommandId();
|
int id = *evt->GetCommandId();
|
||||||
|
|
||||||
// User has pointed an item, so show it in a different way
|
// User has pointed an item, so show it in a different way
|
||||||
if( id >= 0 && id < limit )
|
if( id > 0 && id <= limit )
|
||||||
{
|
{
|
||||||
current = ( *aCollector )[id];
|
current = ( *aCollector )[id - 1];
|
||||||
current->SetBrightened();
|
current->SetBrightened();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -757,8 +757,8 @@ BOARD_ITEM* SELECTION_TOOL::disambiguationMenu( GENERAL_COLLECTOR* aCollector )
|
||||||
boost::optional<int> id = evt->GetCommandId();
|
boost::optional<int> id = evt->GetCommandId();
|
||||||
|
|
||||||
// User has selected an item, so this one will be returned
|
// User has selected an item, so this one will be returned
|
||||||
if( id && ( *id >= 0 ) )
|
if( id && ( *id > 0 ) )
|
||||||
current = ( *aCollector )[*id];
|
current = ( *aCollector )[*id - 1];
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue