Skip to content

Re-render param badges in open menus on MIDI learn - #257

Merged
sastraxi merged 3 commits into
refactor/edit-contextfrom
fix/plugin-menu-doesnt-react-badge-change
Sep 9, 2026
Merged

sastraxi merged 3 commits into
refactor/edit-contextfrom
fix/plugin-menu-doesnt-react-badge-change

Conversation

@sastraxi

@sastraxi sastraxi commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Previously, when you opened up a plugin menu it would properly show badges i.e. (1/2/A/B/C/D) on bound parameter editors, but these badges did not update when changes are made e.g. via MIDI learn, or removing bindings in MOD-UI.

This PR fixes that by creating a binding "revision" that monotonically increases whenever a binding is updated. Each UI tick, plugin menus now compare the current revision to the current one being advertised; any difference wins (to account for overflow). Badges are then re-calculated and re-drawn, if required.

@sastraxi sastraxi changed the title Make plugin menus react to MIDI learn Re-render parameter badges in open menus on MIDI learn Sep 8, 2026
@sastraxi sastraxi changed the title Re-render parameter badges in open menus on MIDI learn Re-render param badges in open menus on MIDI learn Sep 8, 2026

@rreichenbach rreichenbach left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work with everything I tried.

@sastraxi
sastraxi merged commit 5497941 into main Sep 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants