Merge pull request #5223 from node-red/5219-fix-undo-splice-in-group

Add splice history events to original add event
This commit is contained in:
Nick O'Leary
2025-07-21 17:47:49 +01:00
committed by GitHub

View File

@@ -1520,6 +1520,7 @@ RED.view = (function() {
}
var nn;
var historyEvent;
let addHistoryEvent;
if (/^_action_:/.test(type)) {
const actionName = type.substring(9)
quickAddActive = false;
@@ -1553,6 +1554,7 @@ RED.view = (function() {
nn = result.node;
historyEvent = result.historyEvent;
}
addHistoryEvent = historyEvent;
if (keepAdding) {
mouse_mode = RED.state.QUICK_JOINING;
}
@@ -1707,7 +1709,8 @@ RED.view = (function() {
if (linkToSplice) {
resetMouseVars();
spliceLink(linkToSplice, nn, historyEvent)
// Add any history event data to the original add event
spliceLink(linkToSplice, nn, addHistoryEvent)
}
RED.history.push(historyEvent);
RED.nodes.dirty(true);