Fixed bug where source couldn't be saved in FF using a group

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@974 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2009-11-24 14:33:48 +00:00
parent 27064ff8da
commit da09855230
1 changed files with 6 additions and 4 deletions

View File

@ -3916,8 +3916,7 @@ function BatchCommand(text) {
// identify layers // identify layers
identifyLayers(); identifyLayers();
selectorManager.update(); canvas.clearSelection();
addCommandToHistory(batchCmd); addCommandToHistory(batchCmd);
call("changed", [svgcontent]); call("changed", [svgcontent]);
} catch(e) { } catch(e) {
@ -5464,7 +5463,7 @@ function BatchCommand(text) {
// Make sure the expected BBox is returned if the element is a group // Make sure the expected BBox is returned if the element is a group
var getCheckedBBox = function(elem) { var getCheckedBBox = function(elem) {
if(elem.tagName == 'g') { if(elem.tagName == 'g') {
return canvas.getStrokedBBox(elem.childNodes); return canvas.getStrokedBBox($(elem).children());
} else { } else {
try { try {
var bb = elem.getBBox(); var bb = elem.getBBox();
@ -5510,6 +5509,9 @@ function BatchCommand(text) {
full_bb = getCheckedBBox(this); full_bb = getCheckedBBox(this);
}); });
// This shouldn't ever happen...
if(full_bb == null) return null;
if(elems.length == 1) return full_bb; if(elems.length == 1) return full_bb;
var max_x = full_bb.x + full_bb.width; var max_x = full_bb.x + full_bb.width;