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)
This commit is contained in:
parent
17dc324e85
commit
79b6991d7b
|
@ -97,8 +97,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;
|
||||
}
|
||||
|
||||
|
@ -106,8 +106,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;
|
||||
}
|
||||
|
||||
|
|
|
@ -216,7 +216,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
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue