fix: tail toggle/scroll now commits to ext-state immediately

markTailDirty() called MarkProjectDirty() but never called
saveToActiveProject(), so the new tail value was never written
to SetProjExtState. On unsaved projects saveToActiveProject()
no-ops cleanly, resolving the companion Major at the same time.
This commit is contained in:
2026-07-23 19:19:10 -04:00
parent 37affc6a70
commit beaec8642a
+8 -4
View File
@@ -534,11 +534,15 @@ bool pointInFooter(int x, int y) {
return f.top < f.bottom && x >= f.left && x < f.right && y >= f.top && y < f.bottom; return f.top < f.bottom && x >= f.left && x < f.right && y >= f.top && y < f.bottom;
} }
// Marks the active project dirty so a tail-setting change saves with the project. // Commits the current tail setting to ext state and marks the active project dirty
// A bare tail toggle dirtying the project is intended (it IS project state now). // so the change travels inside the .rpp on Ctrl+S. saveToActiveProject() is the only
// persist writes the setting into ext state on the next save; this only flags that a // path that calls SetProjExtState for the tail key — calling it here closes the gap
// save is owed. NON-DESTRUCTIVE: touches nothing in the bank/arrange. // where toggle/scroll would dirty the project but the new value was never written.
// On an unsaved project saveToActiveProject() no-ops cleanly (documented in persist.h).
// MarkProjectDirty runs unconditionally so REAPER knows a save is owed either way.
// NON-DESTRUCTIVE: touches nothing in the bank/arrange.
void markTailDirty() { void markTailDirty() {
if (g_panel.session) g_panel.session->saveToActiveProject();
ReaProject* proj = EnumProjects(-1, nullptr, 0); ReaProject* proj = EnumProjects(-1, nullptr, 0);
if (proj) MarkProjectDirty(proj); if (proj) MarkProjectDirty(proj);
} }