fix(view): park untagged leaves in non-Arrange modes; refresh TCP/MCP on apply

planToggle now enumerates all leaves in the FolderTree instead of only tagged
membership entries, so untagged (Arrange-member) tracks park in Design and
restore in Arrange. applyMode calls TrackList_AdjustWindows + UpdateArrange so
changes render immediately. Correct the stale "tagged-only" invariant comments.
This commit is contained in:
2026-07-23 04:59:50 -04:00
parent 60add4afc7
commit 4bf394b89c
5 changed files with 130 additions and 22 deletions
+10
View File
@@ -27,6 +27,8 @@
#define REAPERAPI_WANT_TrackFX_SetOffline
#define REAPERAPI_WANT_Undo_BeginBlock2
#define REAPERAPI_WANT_Undo_EndBlock2
#define REAPERAPI_WANT_TrackList_AdjustWindows
#define REAPERAPI_WANT_UpdateArrange
#include "reaper_plugin_functions.h"
namespace reasampler {
@@ -191,6 +193,14 @@ bool applyMode(ViewModeModel& model, const std::string& targetModeId, ReaProject
model.setActiveMode(targetModeId);
// Force REAPER to rebuild the TCP + MCP so visibility/park changes appear now,
// not on the user's next TCP interaction. TrackList_AdjustWindows(false) does the
// major (full) relayout required when tracks appear/disappear from the panels;
// UpdateArrange() repaints the arrange view. Both are documented for exactly this
// "you changed track-info flags, now refresh the panels" case.
TrackList_AdjustWindows(false);
UpdateArrange();
Undo_EndBlock2(proj, "ReaSampler: apply Design View mode", -1);
return true;
}