From 81560a70eb75eafe77e5e28cc8b32feab94fd1c9 Mon Sep 17 00:00:00 2001 From: Alexis Deveria Date: Mon, 28 Dec 2009 19:07:41 +0000 Subject: [PATCH] Fixed Issue 381: Changing a segment type of a rotated path causes problems git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1119 eee81c28-f429-11dd-99c0-75d572ba1ddd --- editor/svgcanvas.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/editor/svgcanvas.js b/editor/svgcanvas.js index f9f1acb4..4c6c268b 100644 --- a/editor/svgcanvas.js +++ b/editor/svgcanvas.js @@ -3125,6 +3125,7 @@ function BatchCommand(text) { } resetPointGrips(); updateSegLine(true); + updateSegLine(); } // Rotate all points of a path and remove its transform value @@ -4255,15 +4256,13 @@ function BatchCommand(text) { current_path_pts[current_path_pts.length-2] = getPathPoint(0,true)[0]; current_path_pts[current_path_pts.length-1] = getPathPoint(0,true)[1]; } - updateSegLine(); // make these changes undo-able } // if (current_path_pt_drag != -1) else if(current_ctrl_pt_drag != -1) { current_ctrl_pt_drag = -1; recalcRotatedPath(); - updateSegLine(); - var batchCmd = new BatchCommand("Edit Path control points"); + var batchCmd = new BatchCommand("Edit Path control points"); batchCmd.addSubCommand(new ChangeElementCommand(current_path, {d:current_path_oldd})); addCommandToHistory(batchCmd); call("changed", [current_path]); @@ -5662,10 +5661,11 @@ function BatchCommand(text) { } replacePathSeg(new_type, next_index, points); - + addAllPointGripsToPath(); - recalculateDimensions(current_path); + // recalculateDimensions(current_path); updateSegLine(true); + recalcRotatedPath(); batchCmd.addSubCommand(new ChangeElementCommand(current_path, {d: old_d})); addCommandToHistory(batchCmd);