From da09855230fd1add4c42c3eb6af7ce8a9f07b5a8 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Tue, 24 Nov 2009 14:33:48 +0000 Subject: [PATCH] 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 --- editor/svgcanvas.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index 06ad2251..950f71eb 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -3916,8 +3916,7 @@ function BatchCommand(text) { // identify layers identifyLayers(); - selectorManager.update(); - + canvas.clearSelection(); addCommandToHistory(batchCmd); call("changed", [svgcontent]); } catch(e) { @@ -5464,7 +5463,7 @@ function BatchCommand(text) { // Make sure the expected BBox is returned if the element is a group var getCheckedBBox = function(elem) { if(elem.tagName == 'g') { - return canvas.getStrokedBBox(elem.childNodes); + return canvas.getStrokedBBox($(elem).children()); } else { try { var bb = elem.getBBox(); @@ -5501,7 +5500,7 @@ function BatchCommand(text) { } return bb; - } catch(e) { return null; } + } catch(e) { return null; } } } var full_bb; @@ -5510,6 +5509,9 @@ function BatchCommand(text) { full_bb = getCheckedBBox(this); }); + // This shouldn't ever happen... + if(full_bb == null) return null; + if(elems.length == 1) return full_bb; var max_x = full_bb.x + full_bb.width;