Design View: drop the undo blocks around writes that mint nothing; the membership actions own theirs
Flag writes are silent from a timer, so a block around a reapply or the reconcile repair could only manufacture a point. The real switch's span is unchanged.
This commit is contained in:
@@ -2,12 +2,10 @@
|
||||
// test framework.
|
||||
//
|
||||
// The properties under test: the four flags a park drives address exactly the four
|
||||
// REAPER parameters the tool owns (never mute, never solo), and one mode apply leaves
|
||||
// at most ONE undo point — none at all when a reapply found everything already where
|
||||
// it wanted it.
|
||||
// REAPER parameters the tool owns (never mute, never solo), the re-park union, the
|
||||
// park-shaped chain read, and the EXPOSE report's wording.
|
||||
|
||||
#include "../src/shell/view/view_park.h"
|
||||
#include "../src/shell/view/view.h" // applyMintsUndoPoint — the apply's undo-point fold
|
||||
|
||||
#include "core/view/view_mode_model.h" // makeParkPlan — the park flags' only producer
|
||||
|
||||
@@ -65,32 +63,6 @@ static void testAParkPlanDrivesEveryDrivenFlagToZero() {
|
||||
CHECK(parms.size() == 4);
|
||||
}
|
||||
|
||||
// -- the apply's one undo point ----------------------------------------------
|
||||
//
|
||||
// These pin applyMintsUndoPoint's fold only. The `wroteAnything` verdict it consumes
|
||||
// — writeIfChanged / parkTrack / restoreTrack, all running against live REAPER calls
|
||||
// — cannot be pinned here; docs/VERIFICATION.md §"Mode switching" is the sole cover
|
||||
// for that plumbing being wired correctly.
|
||||
|
||||
static void testARealSwitchAlwaysLeavesAPointEvenWithNothingToWrite() {
|
||||
// An explicitly fired action stays undoable even when the plan found nothing to
|
||||
// write — the discard form is for reapplies only.
|
||||
CHECK(applyMintsUndoPoint(/*realSwitch=*/true, /*wroteAnything=*/false));
|
||||
CHECK(applyMintsUndoPoint(/*realSwitch=*/true, /*wroteAnything=*/true));
|
||||
}
|
||||
|
||||
static void testAReapplyThatWroteSomethingLeavesAPoint() {
|
||||
// A tag/untag reapply that actually parked a track: real project state moved.
|
||||
CHECK(applyMintsUndoPoint(/*realSwitch=*/false, /*wroteAnything=*/true));
|
||||
}
|
||||
|
||||
static void testAReapplyThatWroteNothingLeavesNoPointAtAll() {
|
||||
// The project-load reapply over a project saved fully parked: every flag already
|
||||
// sits where the plan wants it. Opening a project must not cost the user an undo
|
||||
// step.
|
||||
CHECK(!applyMintsUndoPoint(/*realSwitch=*/false, /*wroteAnything=*/false));
|
||||
}
|
||||
|
||||
// -- the re-park union: a plugin added between a restore and the next park --------
|
||||
//
|
||||
// Sequence under test: park -> restore -> user adds plugin P -> re-park. Without the
|
||||
@@ -216,10 +188,6 @@ int main() {
|
||||
testNoDrivenFlagCanEverAddressMuteOrSolo();
|
||||
testAParkPlanDrivesEveryDrivenFlagToZero();
|
||||
|
||||
testARealSwitchAlwaysLeavesAPointEvenWithNothingToWrite();
|
||||
testAReapplyThatWroteSomethingLeavesAPoint();
|
||||
testAReapplyThatWroteNothingLeavesNoPointAtAll();
|
||||
|
||||
testAPluginAddedWhileRestoredJoinsTheUnionRatherThanBeingDropped();
|
||||
testAPluginRemovedWhileRestoredStaysInTheUnionForResolveFxRestoreToDrop();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user