fix(view): lane-separate a content-bearing folder's own media when it's derived-visible in >1 mode

planLaneMinting now takes the model + folder tree and splits a track visible in
2+ modes that carries own media (own-item span OR folder derived-visibility),
fixing an item dropped on a cross-mode folder leaking into every mode. Show-both
tracks are never force-split.
This commit is contained in:
2026-07-24 05:08:18 -04:00
parent 960c5166ee
commit 78a31ff215
5 changed files with 298 additions and 50 deletions
+8 -5
View File
@@ -52,13 +52,16 @@ namespace reasampler {
// registered mode. `proj` may be nullptr to mean REAPER's current project.
bool applyMode(ViewModeModel& model, const std::string& targetModeId, ReaProject* proj);
// Mints managed fixed lanes for any track in `proj` that now holds content of MORE
// THAN ONE mode, and assigns each item to its mode's managed lane (Phase D2 Wave 3).
// Mints managed fixed lanes for any track in `proj` that is VISIBLE IN MORE THAN ONE
// MODE while carrying its own media, and assigns each item to its mode's managed lane
// (Phase D2 Wave 3; visibility trigger added by the folder-media fix).
// 1. Enumerates every track + its items; resolves each item's mode from the model's
// membership (untagged ⇒ Arrange) and reads whether it currently sits on a MANUAL
// lane (exempt).
// 2. Runs the pure planLaneMinting decision. A track with content of only one mode
// is left whole-track-parked (D1) — NOT lane-split.
// lane (exempt). Builds the FolderTree (I_FOLDERDEPTH) so derived visibility counts.
// 2. Runs the pure planLaneMinting decision (model + tree aware). A track visible in
// exactly one mode is left whole-track-parked (D1) — NOT lane-split. A track visible
// in >1 mode while carrying own media splits: its own items span modes, OR it is a
// content-bearing folder derived-visible across modes. show-both tracks never split.
// 3. For each track that must split: enables fixed-lane mode (I_FREEMODE=2), ensures
// enough fixed lanes (I_NUMFIXEDLANES), stamps each managed lane's durable name
// (P_LANENAME:n), records the lane MANAGED-for-its-mode in the model's ownership