fix(D2-W2): correct manual-lane exemption, drop read-only item C_LANEPLAYS write

isOnManualLane predicate now correctly treats unnamed fixed-lane lanes as manual;
item-side C_LANEPLAYS loop removed (SDK read-only); explicit #include <set> in
view_mode_model.cpp; undo-block omission in detectNewContent documented as intentional.
This commit is contained in:
2026-07-23 17:51:55 -04:00
parent af34143107
commit ebdb4eae66
6 changed files with 96 additions and 28 deletions
+16
View File
@@ -58,4 +58,20 @@ std::optional<std::string> managedLaneKey(const std::string& laneName);
// contract is asserted here so minting and reading cannot drift.
std::string laneNameForMode(const std::string& modeId);
// True iff an item on a fixed-lane track with the given lane name is on a MANUAL lane
// (i.e. exempt from auto-tag). The two inputs are:
// isFixedLaneTrack — whether the item's track has I_FREEMODE==2. On a normal
// (non-fixed-lane) track the concept of a "manual lane" does not
// apply; the item follows the normal auto-tag rule (return false).
// laneName — the durable P_LANENAME of the lane the item sits on. A lane
// that carries kManagedLanePrefix is a tool-minted managed lane
// (not manual); any other name — including empty (unnamed) — is
// a user-minted manual lane (exempt from auto-tag).
//
// This is the SINGLE predicate that governs BOTH the apply path (which lanes may be
// driven) and the auto-tag exemption path (which items are exempt). It is unit-tested
// here so both paths share exactly one definition; the shell supplies the two REAPER
// inputs (I_FREEMODE result, P_LANENAME string) and never re-derives this logic.
bool isOnManualLane(bool isFixedLaneTrack, const std::string& laneName);
} // namespace reasampler