Merge pS-ga-paneltoggle: repaint panel mode toggle on Design/Arrange action
This commit is contained in:
@@ -251,6 +251,7 @@ void doToggleMode() {
|
|||||||
if (target.empty()) return; // no modes to cycle to (degenerate)
|
if (target.empty()) return; // no modes to cycle to (degenerate)
|
||||||
applyMode(g_session->view(), target, nullptr);
|
applyMode(g_session->view(), target, nullptr);
|
||||||
persistViewState();
|
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
|
// 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) {
|
void doActivateMode(const std::string& modeId) {
|
||||||
applyMode(g_session->view(), modeId, nullptr);
|
applyMode(g_session->view(), modeId, nullptr);
|
||||||
persistViewState();
|
persistViewState();
|
||||||
|
bankPanelInvalidate(); // repaint the footer [Arrange|Design] toggle immediately
|
||||||
}
|
}
|
||||||
|
|
||||||
// Tag the selection's leaves into `modeId`, then reapply so the change is immediate.
|
// Tag the selection's leaves into `modeId`, then reapply so the change is immediate.
|
||||||
|
|||||||
@@ -3435,6 +3435,10 @@ void bankPanelToggledBanksFullHeight() {
|
|||||||
setFullHeight(BankPanelFullHeight::BanksOnly);
|
setFullHeight(BankPanelFullHeight::BanksOnly);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void bankPanelInvalidate() {
|
||||||
|
if (g_panel.hwnd) InvalidateRect(g_panel.hwnd, nullptr, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
void bankPanelShutdown() {
|
void bankPanelShutdown() {
|
||||||
closePanel();
|
closePanel();
|
||||||
deinitPreview();
|
deinitPreview();
|
||||||
|
|||||||
@@ -117,6 +117,12 @@ void bankPanelToggledPoolFullHeight();
|
|||||||
// Bound to the "banks full-height" action. Requests a repaint.
|
// Bound to the "banks full-height" action. Requests a repaint.
|
||||||
void bankPanelToggledBanksFullHeight();
|
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
|
// Tears the panel down on extension unload: destroys the window and releases any
|
||||||
// cached thumbnails / PCM handles. Mirror of bankPanelInit; safe if never opened.
|
// cached thumbnails / PCM handles. Mirror of bankPanelInit; safe if never opened.
|
||||||
void bankPanelShutdown();
|
void bankPanelShutdown();
|
||||||
|
|||||||
Reference in New Issue
Block a user