Ensure only one layer is selected (Issue 73)

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@673 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Jeff Schiller 2009-09-22 02:55:28 +00:00
parent 61fe5dc9fe
commit 942aa40c9f
1 changed files with 4 additions and 0 deletions

View File

@ -1093,6 +1093,7 @@ function svg_edit_setup() {
svgCanvas.createLayer(newName);
updateContextPanel();
populateLayers();
$('#layerlist option').removeAttr("selected");
$('#layerlist option:last').attr("selected", "selected");
});
@ -1100,6 +1101,9 @@ function svg_edit_setup() {
if (svgCanvas.deleteCurrentLayer()) {
updateContextPanel();
populateLayers();
// This matches what SvgCanvas does
// TODO: make this behavior less brittle (svg-editor should get which
// layer is selected from the canvas and then select that one in the UI)
$('#layerlist option:last').attr("selected", "selected");
}
});