diff --git a/editor/svg-editor.js b/editor/svg-editor.js index d0f004aa..5e743664 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -322,20 +322,10 @@ function svg_edit_setup() { if ( (elem && !is_node) || multiselected) { // update the selected elements' layer - $('#selLayerNames')[0].removeAttribute('disabled'); - var opts = $('#selLayerNames option'); - for (var i = 0; i < opts.length; ++i) { - var opt = opts[i]; - if (currentLayer == opt.textContent) { - opt.setAttribute('selected', 'selected'); - } - else { - opt.removeAttribute('selected'); - } - } + $('#selLayerNames').removeAttr('disabled').val(currentLayer); } else { - $('#selLayerNames')[0].setAttribute('disabled', 'disabled'); + $('#selLayerNames').attr('disabled', 'disabled'); } }; @@ -1515,7 +1505,7 @@ function svg_edit_setup() { appendstr += "" + name + ""; } layerlist.append(appendstr); - selLayerNames.append(""); + selLayerNames.append(""); } // handle selection of layer $('#layerlist td.layername')