Add splice history events to original add event

This commit is contained in:
Nick O'Leary
2025-07-21 17:26:34 +01:00
parent 9b4acba82e
commit 2b5fa37b70

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);