mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Prevent no-op edit of node marking as changed due to icon
This commit is contained in:
parent
72c400794c
commit
dcda513901
@ -881,7 +881,6 @@ RED.diff = (function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var properties = Object.keys(node).filter(function(p) { return p!='inputLabels'&&p!='outputLabels'&&p!='z'&&p!='wires'&&p!=='x'&&p!=='y'&&p!=='id'&&p!=='type'&&(!def.defaults||!def.defaults.hasOwnProperty(p))});
|
var properties = Object.keys(node).filter(function(p) { return p!='inputLabels'&&p!='outputLabels'&&p!='z'&&p!='wires'&&p!=='x'&&p!=='y'&&p!=='id'&&p!=='type'&&(!def.defaults||!def.defaults.hasOwnProperty(p))});
|
||||||
if (def.defaults) {
|
if (def.defaults) {
|
||||||
properties = properties.concat(Object.keys(def.defaults));
|
properties = properties.concat(Object.keys(def.defaults));
|
||||||
@ -889,6 +888,13 @@ RED.diff = (function() {
|
|||||||
if (node.type !== 'tab') {
|
if (node.type !== 'tab') {
|
||||||
properties = properties.concat(['inputLabels','outputLabels']);
|
properties = properties.concat(['inputLabels','outputLabels']);
|
||||||
}
|
}
|
||||||
|
if ( ((localNode && localNode.hasOwnProperty('icon')) || (remoteNode && remoteNode.hasOwnProperty('icon'))) &&
|
||||||
|
properties.indexOf('icon') === -1
|
||||||
|
) {
|
||||||
|
properties.unshift('icon');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
properties.forEach(function(d) {
|
properties.forEach(function(d) {
|
||||||
localChanged = false;
|
localChanged = false;
|
||||||
remoteChanged = false;
|
remoteChanged = false;
|
||||||
|
@ -1110,7 +1110,7 @@ RED.editor = (function() {
|
|||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (icon !== defaultIcon) {
|
if (icon !== "" && icon !== defaultIcon) {
|
||||||
changes.icon = editing_node.icon;
|
changes.icon = editing_node.icon;
|
||||||
editing_node.icon = icon;
|
editing_node.icon = icon;
|
||||||
changed = true;
|
changed = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user