Fixed issue 300

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@894 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2009-11-02 14:29:12 +00:00
parent 4f504d8b7b
commit 29677a5721

View File

@@ -3508,7 +3508,8 @@ function BatchCommand(text) {
}
}
// if child has a bbox (i.e. not a <title> or <defs> element), then it is an orphan
else if(canvas.getBBox(child)) {
else if(canvas.getBBox(child) && child.nodeName != 'defs') { // Opera returns a BBox for defs
var bb = canvas.getBBox(child);
orphans.push(child);
}
}
@@ -5180,9 +5181,9 @@ function BatchCommand(text) {
current_layer.appendChild(elem);
batchCmd.addSubCommand(new InsertElementCommand(elem));
}
if (!batchCmd.isEmpty()) {
this.addToSelection(copiedElements);
this.addToSelection(copiedElements.reverse()); // Need to reverse for correct selection-adding
this.moveSelectedElements(20,20,false);
addCommandToHistory(batchCmd);
call("selected", selectedElements);