From 39b69643bdbcb7b169776e1401273dfcec3d53d8 Mon Sep 17 00:00:00 2001 From: Bill Kendrick Date: Sun, 24 Jan 2021 16:49:00 -0800 Subject: [PATCH] Avoid leaving XOR outline after Eraser drag --- src/tuxpaint.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/tuxpaint.c b/src/tuxpaint.c index f4e0c724b..e8174c8bb 100644 --- a/src/tuxpaint.c +++ b/src/tuxpaint.c @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (See COPYING.txt) - June 14, 2002 - January 18, 2021 + June 14, 2002 - January 24, 2021 */ @@ -5421,9 +5421,14 @@ static void mainloop(void) } else if (cur_tool == TOOL_ERASER) { + int sz; + /* Still pushing, and moving - Erase! */ eraser_draw(old_x, old_y, new_x, new_y); + + sz = calc_eraser_size(cur_eraser); + rect_xor(new_x - sz / 2, new_y - sz / 2, new_x + sz / 2, new_y + sz / 2); } }