From 01f3a14dc31e95554d42ad844c0209187788ab18 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Fri, 21 Jan 2022 17:40:16 +0000 Subject: [PATCH] Allow more (lots more) unfold from bus menu entries. Fixes https://gitlab.com/kicad/code/kicad/issues/10529 (cherry picked from commit 4665cdcdc5b00bf0d52f1f9160dcd100a2cf2df2) --- eeschema/eeschema_id.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eeschema/eeschema_id.h b/eeschema/eeschema_id.h index 88392992df..eeb3f0517a 100644 --- a/eeschema/eeschema_id.h +++ b/eeschema/eeschema_id.h @@ -43,6 +43,12 @@ */ #define MAX_UNIT_COUNT_PER_PACKAGE 676 +/** + * While it would seem that an unfold-from-bus menu with over 100 items would be + * hard to deal with, we've already had one user who wants 256. + */ +#define MAX_BUS_UNFOLD_MENU_ITEMS 1024 + /** * Command IDs for the schematic editor. @@ -80,7 +86,7 @@ enum id_eeschema_frm // // Dynamically bound in AddMenusForBus(): ID_POPUP_SCH_UNFOLD_BUS = ID_POPUP_MENU_START, - ID_POPUP_SCH_UNFOLD_BUS_END = ID_POPUP_SCH_UNFOLD_BUS + 128, + ID_POPUP_SCH_UNFOLD_BUS_END = ID_POPUP_SCH_UNFOLD_BUS + MAX_BUS_UNFOLD_MENU_ITEMS, // Unit select context menus command IDs. ID_POPUP_SCH_SELECT_UNIT_CMP,