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:
@@ -14,8 +14,6 @@
|
||||
#define REAPERAPI_MINIMAL
|
||||
#define REAPERAPI_WANT_EnumProjects
|
||||
#define REAPERAPI_WANT_TrackList_AdjustWindows
|
||||
#define REAPERAPI_WANT_Undo_BeginBlock2
|
||||
#define REAPERAPI_WANT_Undo_EndBlock2
|
||||
#define REAPERAPI_WANT_UpdateArrange
|
||||
#define REAPERAPI_WANT_ValidatePtr2
|
||||
#include "reaper_plugin_functions.h"
|
||||
@@ -58,8 +56,11 @@ void reconcileAppliedFlags(ViewModeModel& model, ReaProject* proj) {
|
||||
readFolderEntries(project, handleByGuid);
|
||||
const TrackByGuid trackByGuid = indexHandles(handleByGuid);
|
||||
|
||||
// NO undo block, deliberately: this runs in the wake of a Ctrl-Z, and the flag
|
||||
// writes below mint nothing on their own — a block could only manufacture the point
|
||||
// that would become the thing the user's next Ctrl-Z undoes. Do not reintroduce one
|
||||
// (see this directory's CLAUDE.md).
|
||||
bool wrote = false;
|
||||
Undo_BeginBlock2(project);
|
||||
{
|
||||
UiRefreshHold uiHold;
|
||||
for (const TrackFlagOp& op : result.ops) {
|
||||
@@ -69,7 +70,6 @@ void reconcileAppliedFlags(ViewModeModel& model, ReaProject* proj) {
|
||||
wrote = true;
|
||||
}
|
||||
}
|
||||
Undo_EndBlock2(project, "", 0); // discard form — see the header
|
||||
|
||||
if (wrote) {
|
||||
TrackList_AdjustWindows(false); // tracks reappearing owe the full relayout
|
||||
|
||||
Reference in New Issue
Block a user