diff --git a/editor/js/nodes.js b/editor/js/nodes.js index 2d5060971..b1ee091c3 100644 --- a/editor/js/nodes.js +++ b/editor/js/nodes.js @@ -492,7 +492,7 @@ RED.nodes = (function() { if (n.outputs > 0 && n.outputLabels && !/^\s*$/.test(n.outputLabels.join(""))) { node.outputLabels = n.outputLabels.slice(); } - if (n.icon) { + if (!n._def.defaults.hasOwnProperty("icon") && n.icon) { var defIcon = RED.utils.getDefaultNodeIcon(n._def, n); if (n.icon !== defIcon.module+"/"+defIcon.file) { node.icon = n.icon; diff --git a/editor/js/ui/editor.js b/editor/js/ui/editor.js index adfc15598..085313aa8 100644 --- a/editor/js/ui/editor.js +++ b/editor/js/ui/editor.js @@ -110,6 +110,9 @@ RED.editor = (function() { } if (node.icon) { var iconPath = RED.utils.separateIconPath(node.icon); + if (!iconPath.module) { + return isValid; + } var iconSets = RED.nodes.getIconSets(); var iconFileList = iconSets[iconPath.module]; if (!iconFileList || iconFileList.indexOf(iconPath.file) === -1) { @@ -167,7 +170,7 @@ RED.editor = (function() { } } } - if (node.icon) { + if (!node._def.defaults.hasOwnProperty("icon") && node.icon) { var iconPath = RED.utils.separateIconPath(node.icon); var iconSets = RED.nodes.getIconSets(); var iconFileList = iconSets[iconPath.module]; @@ -736,49 +739,51 @@ RED.editor = (function() { buildLabelRow().appendTo(outputsDiv); } - $('
').appendTo(dialogForm); - var iconDiv = $("#node-settings-icon"); - $('