From ceb89dd5573ad84a61b1446a2a5c6ec7b4a0b0e9 Mon Sep 17 00:00:00 2001 From: Jeff Schiller Date: Sun, 22 Nov 2009 03:45:18 +0000 Subject: [PATCH] Fix undo problem when moving rotated/resized groups due to global start_transform variable git-svn-id: http://svg-edit.googlecode.com/svn/trunk@965 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index dc090076..b06d6951 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -1540,6 +1540,9 @@ function BatchCommand(text) { // force the accumulated translation down to the children if (tx != 0 || ty != 0) { + // FIX ME: unfortunately recalculateDimensions depends on this global variable + var old_start_transform = start_transform; + start_transform = ""; // we pass the translates down to the individual children var children = selected.childNodes; var c = children.length; @@ -1553,6 +1556,7 @@ function BatchCommand(text) { batchCmd.addSubCommand( recalculateDimensions(child) ); } } + start_transform = old_start_transform; } } // else, it's a non-group