diff --git a/editor/js/ui/diff.js b/editor/js/ui/diff.js index b5af903a0..457ba5638 100644 --- a/editor/js/ui/diff.js +++ b/editor/js/ui/diff.js @@ -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))}); if (def.defaults) { properties = properties.concat(Object.keys(def.defaults)); @@ -889,6 +888,13 @@ RED.diff = (function() { if (node.type !== 'tab') { 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) { localChanged = false; remoteChanged = false; diff --git a/editor/js/ui/editor.js b/editor/js/ui/editor.js index e0445be54..46904131b 100644 --- a/editor/js/ui/editor.js +++ b/editor/js/ui/editor.js @@ -1110,7 +1110,7 @@ RED.editor = (function() { changed = true; } } else { - if (icon !== defaultIcon) { + if (icon !== "" && icon !== defaultIcon) { changes.icon = editing_node.icon; editing_node.icon = icon; changed = true;