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
master
Alexis Deveria 2009-12-28 19:07:41 +00:00
parent 118c0c766c
commit 81560a70eb
1 changed files with 5 additions and 5 deletions

View File

@ -3125,6 +3125,7 @@ function BatchCommand(text) {
} }
resetPointGrips(); resetPointGrips();
updateSegLine(true); updateSegLine(true);
updateSegLine();
} }
// Rotate all points of a path and remove its transform value // Rotate all points of a path and remove its transform value
@ -4255,14 +4256,12 @@ function BatchCommand(text) {
current_path_pts[current_path_pts.length-2] = getPathPoint(0,true)[0]; current_path_pts[current_path_pts.length-2] = getPathPoint(0,true)[0];
current_path_pts[current_path_pts.length-1] = getPathPoint(0,true)[1]; current_path_pts[current_path_pts.length-1] = getPathPoint(0,true)[1];
} }
updateSegLine();
// make these changes undo-able // make these changes undo-able
} // if (current_path_pt_drag != -1) } // if (current_path_pt_drag != -1)
else if(current_ctrl_pt_drag != -1) { else if(current_ctrl_pt_drag != -1) {
current_ctrl_pt_drag = -1; current_ctrl_pt_drag = -1;
recalcRotatedPath(); 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})); batchCmd.addSubCommand(new ChangeElementCommand(current_path, {d:current_path_oldd}));
addCommandToHistory(batchCmd); addCommandToHistory(batchCmd);
@ -5664,8 +5663,9 @@ function BatchCommand(text) {
replacePathSeg(new_type, next_index, points); replacePathSeg(new_type, next_index, points);
addAllPointGripsToPath(); addAllPointGripsToPath();
recalculateDimensions(current_path); // recalculateDimensions(current_path);
updateSegLine(true); updateSegLine(true);
recalcRotatedPath();
batchCmd.addSubCommand(new ChangeElementCommand(current_path, {d: old_d})); batchCmd.addSubCommand(new ChangeElementCommand(current_path, {d: old_d}));
addCommandToHistory(batchCmd); addCommandToHistory(batchCmd);