Merge pS-ga-paneltoggle: repaint panel mode toggle on Design/Arrange action

This commit is contained in:
2026-07-28 06:59:20 -04:00
3 changed files with 12 additions and 0 deletions
+2
View File
@@ -251,6 +251,7 @@ void doToggleMode() {
if (target.empty()) return; // no modes to cycle to (degenerate)
applyMode(g_session->view(), target, nullptr);
persistViewState();
bankPanelInvalidate(); // repaint the footer [Arrange|Design] toggle immediately
}
// Direct jump to a named mode. applyMode is a no-op (returns false, no mutation) if
@@ -258,6 +259,7 @@ void doToggleMode() {
void doActivateMode(const std::string& modeId) {
applyMode(g_session->view(), modeId, nullptr);
persistViewState();
bankPanelInvalidate(); // repaint the footer [Arrange|Design] toggle immediately
}
// Tag the selection's leaves into `modeId`, then reapply so the change is immediate.
+4
View File
@@ -3435,6 +3435,10 @@ void bankPanelToggledBanksFullHeight() {
setFullHeight(BankPanelFullHeight::BanksOnly);
}
void bankPanelInvalidate() {
if (g_panel.hwnd) InvalidateRect(g_panel.hwnd, nullptr, FALSE);
}
void bankPanelShutdown() {
closePanel();
deinitPreview();
+6
View File
@@ -117,6 +117,12 @@ void bankPanelToggledPoolFullHeight();
// Bound to the "banks full-height" action. Requests a repaint.
void bankPanelToggledBanksFullHeight();
// Requests an immediate repaint of the panel if it is open. A no-op when the panel
// is closed (safe to call unconditionally). Called by the actions layer after a
// mode change so the footer [Arrange|Design] toggle reflects the new mode without
// requiring a hide/reshow.
void bankPanelInvalidate();
// Tears the panel down on extension unload: destroys the window and releases any
// cached thumbnails / PCM handles. Mirror of bankPanelInit; safe if never opened.
void bankPanelShutdown();