From 95d801765627ea31937f0f778a3511c4c7cd257b Mon Sep 17 00:00:00 2001 From: daniel-c-harvey Date: Thu, 23 Jul 2026 15:36:40 -0400 Subject: [PATCH] fix(bank_panel): drop membership count from mode switch labels --- src/bank_panel.cpp | 18 ++++-------------- src/mode_switch.h | 4 ++-- 2 files changed, 6 insertions(+), 16 deletions(-) diff --git a/src/bank_panel.cpp b/src/bank_panel.cpp index ca47774..5e09aa9 100644 --- a/src/bank_panel.cpp +++ b/src/bank_panel.cpp @@ -383,8 +383,7 @@ int modeCount() { // Draws the segmented mode switch into the header strip of width `w`: one segment // per registered mode (ordinal order), the active mode lit, each labeled with its -// display name and a cheap membership indicator (count of tracks tagged into that -// mode). READ-ONLY: reads g_session->view() live; never mutates the model here +// display name. READ-ONLY: reads g_session->view() live; never mutates the model here // (activation happens on click, in handleClick). void drawModeSwitch(LICE_IBitmap* bmp, int w) { if (!g_panel.session) return; @@ -400,11 +399,6 @@ void drawModeSwitch(LICE_IBitmap* bmp, int w) { const std::vector segs = computeSegmentRects(header, n); if (segs.empty()) return; - // Cheap per-mode membership count: how many tagged leaves opted into this mode. - // Iterate the membership index once per mode (tiny N of modes; the index is the - // set of TAGGED tracks, not all tracks — bounded and cheap). Untagged tracks are - // Arrange members by default but are NOT in the index, so this is a "tagged into" - // count, which is the sensible, cheap indicator (not a full tree walk). const std::string& activeId = view.activeModeId(); HDC dc = bmp->getDC(); @@ -419,13 +413,9 @@ void drawModeSwitch(LICE_IBitmap* bmp, int w) { if (!dc) continue; - int members = 0; - for (const auto& entry : view.membership().all()) - if (entry.second.modeIds.count(mode.id) != 0) ++members; - - // "DisplayName (count)" centered in the segment. A single-line centered - // label; the segment is wide enough for the seed modes' short names. - std::string label = mode.displayName + " (" + std::to_string(members) + ")"; + // Display name centered in the segment. A single-line centered label; + // the segment is wide enough for the seed modes' short names. + const std::string& label = mode.displayName; RECT rc{s.x, s.y, s.x + s.width, s.y + s.height}; SetTextColor(dc, active ? kRgbSegActiveText : kRgbSegText); SetBkMode(dc, TRANSPARENT); diff --git a/src/mode_switch.h b/src/mode_switch.h index 8580094..4813a8c 100644 --- a/src/mode_switch.h +++ b/src/mode_switch.h @@ -30,8 +30,8 @@ struct HeaderRect { }; // One segment's pixel rectangle within the header, top-left origin. These are the -// draw bounds for one mode's button; the panel draws the mode's label + membership -// indicator inside it and lights it when it is the active mode. +// draw bounds for one mode's button; the panel draws the mode's display name inside +// it and lights it when it is the active mode. struct SegmentRect { int x = 0; int y = 0;