diff --git a/editor/js/ui/editor.js b/editor/js/ui/editor.js index a1a1cd4ea..179556716 100644 --- a/editor/js/ui/editor.js +++ b/editor/js/ui/editor.js @@ -776,6 +776,16 @@ RED.editor = (function() { var fileName = selectIconFile.val(); iconFileHidden.val(fileName); }); + var clear = $('').appendTo(iconForm); + clear.click(function(evt) { + evt.preventDefault(); + var iconPath = RED.utils.getDefaultNodeIcon(node._def, node); + selectIconModule.val(iconPath.module); + moduleChange(selectIconModule, selectIconFile, iconModuleHidden, iconFileHidden, iconSets, true); + selectIconFile.removeClass("input-error"); + selectIconFile.val(iconPath.file); + iconFileHidden.val(iconPath.file); + }); moduleChange(selectIconModule, selectIconFile, iconModuleHidden, iconFileHidden, iconSets, false); var iconFileList = iconSets[selectIconModule.val()];