Fix broken unit select context menu

The fix for https://gitlab.com/kicad/code/kicad/issues/10529 kicked the
subsequent IDs for unit selection off the maximum ID value for popup
menus.  This increases the maximum popup number (integers are free)

(cherry picked from commit 79b6991d7b)
This commit is contained in:
Seth Hillbrand 2022-03-02 16:32:04 -08:00
parent adace996f4
commit 548936bb22
2 changed files with 7 additions and 5 deletions

View File

@ -98,8 +98,8 @@ private:
if( !symbol )
{
Append( ID_POPUP_SCH_UNFOLD_BUS, _( "no symbol selected" ), wxEmptyString );
Enable( ID_POPUP_SCH_UNFOLD_BUS, false );
Append( ID_POPUP_SCH_SELECT_UNIT_CMP, _( "no symbol selected" ), wxEmptyString );
Enable( ID_POPUP_SCH_SELECT_UNIT_CMP, false );
return;
}
@ -107,8 +107,8 @@ private:
if( !symbol->GetLibSymbolRef() || symbol->GetLibSymbolRef()->GetUnitCount() < 2 )
{
Append( ID_POPUP_SCH_UNFOLD_BUS, _( "symbol is not multi-unit" ), wxEmptyString );
Enable( ID_POPUP_SCH_UNFOLD_BUS, false );
Append( ID_POPUP_SCH_SELECT_UNIT_CMP, _( "symbol is not multi-unit" ), wxEmptyString );
Enable( ID_POPUP_SCH_SELECT_UNIT_CMP, false );
return;
}

View File

@ -217,7 +217,9 @@ enum main_id
// Reseve ID for popup menus, when we need to know a menu item is inside a popup menu
ID_POPUP_MENU_START,
ID_POPUP_MENU_END = ID_POPUP_MENU_START + 1000,
// The extra here need to minimum be larger than MAX_BUS_UNFOLD_MENU_ITEMS + MAX_UNIT_COUNT_PER_PACKAGE
// These values are stored in eeschema_id.h
ID_POPUP_MENU_END = ID_POPUP_MENU_START + 2048,
ID_END_LIST
};