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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user