From c294532152ae738a5a524166bbb5c915ee39f189 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Tue, 23 Apr 2024 22:29:42 +0200 Subject: [PATCH] Fix undo history of moves and post-deploy handling --- .../@node-red/editor-client/src/js/history.js | 29 +++++++++++++++++-- .../@node-red/editor-client/src/js/ui/view.js | 4 +-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/packages/node_modules/@node-red/editor-client/src/js/history.js b/packages/node_modules/@node-red/editor-client/src/js/history.js index c3a966890..af7bb37a2 100644 --- a/packages/node_modules/@node-red/editor-client/src/js/history.js +++ b/packages/node_modules/@node-red/editor-client/src/js/history.js @@ -706,11 +706,36 @@ RED.history = (function() { } + function markEventDirty (evt) { + // This isn't 100% thorough - just covers the main move/edit/delete cases + evt.dirty = true + if (evt.multi) { + for (let i = 0; i < evt.events.length-1; i++) { + markEventDirty(evt.events[i]) + } + } else if (evt.t === 'move') { + for (let i=0;i