Merge remote-tracking branch 'upstream/master' into stop-start-flows

This commit is contained in:
Steve-Mcl
2022-06-27 18:07:49 +01:00
13 changed files with 65 additions and 13 deletions

View File

@@ -979,13 +979,14 @@ RED.view.tools = (function() {
* - it uses `<paletteLabel> <N>` - where N is the next available integer that
* doesn't clash with any existing nodes of that type
* @param {Object} node The node to set the name of - if not provided, uses current selection
* @param {{ renameBlank: boolean, renameClash: boolean, generateHistory: boolean }} options Possible options are `renameBlank`, `renameClash` and `generateHistory`
*/
function generateNodeNames(node, options) {
options = options || {
options = Object.assign({
renameBlank: true,
renameClash: true,
generateHistory: true
}
}, options)
let nodes = node;
if (node) {
if (!Array.isArray(node)) {

View File

@@ -5875,6 +5875,7 @@ RED.view = (function() {
* @private
*/
function createNode(type, x, y, z) {
const wasDirty = RED.nodes.dirty()
var m = /^subflow:(.+)$/.exec(type);
var activeSubflow = z ? RED.nodes.subflow(z) : null;
if (activeSubflow && m) {
@@ -5933,7 +5934,7 @@ RED.view = (function() {
var historyEvent = {
t: "add",
nodes: [nn.id],
dirty: RED.nodes.dirty()
dirty: wasDirty
}
if (activeSubflow) {
var subflowRefresh = RED.subflow.refresh(true);