From 6637f3fba4798039a22c232a242557735908fea3 Mon Sep 17 00:00:00 2001 From: William Kendrick Date: Mon, 10 Aug 2009 23:47:42 +0000 Subject: [PATCH] Shape tool would only resize a shape if you dragged down or right, not up or left. (SF.net Bug #2834320) --- docs/CHANGES.txt | 5 +++++ src/tuxpaint.c | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 0196de4bd..59e70ff22 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -64,6 +64,11 @@ $Id$ * Bug Fixes --------- * Buffersize for holding Starter and image filenames was way too low. + (Could crash with Starter images with very long filenames.) + + * Shape tool would only resize a shape if you dragged down or right, + not up or left. + (SF.net Bug #2834320) 2009.June.28 (0.9.21) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index 3bdcf54a0..78b34c43f 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -12432,8 +12432,8 @@ static void do_shape(int cx, int cy, int ox, int oy, int rotn, int use_brush) cy += ((y2 - y1) / 2); #endif - rx = ox - cx; - ry = oy - cy; + rx = abs(ox - cx); + ry = abs(oy - cy); /* If the shape has a 1:1 ("locked") aspect ratio, use the larger radius: */