From 4f6b19c0d9e3b6a2865aa5c53fd76ae044baf15a Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 12 Apr 2012 23:58:41 +0200 Subject: [PATCH] Move clearing of target squares to after drag end A dragged piece that would partly overshoot its destination into a square with a marker would effectively protect that marker from erasing, when the erasing was done before the piece was released, because redrawal after the move only would draw the target square. (Unlike erasing, which forces a full redraw.) --- backend.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index afe428e..bd2a2c7 100644 --- a/backend.c +++ b/backend.c @@ -7174,7 +7174,6 @@ LeftClick (ClickType clickType, int xPix, int yPix) toX = x; toY = y; saveAnimate = appData.animate; - MarkTargetSquares(1); if (clickType == Press) { if(gameMode == EditPosition && boards[currentMove][fromY][fromX] == EmptySquare) { // must be Edit Position mode with empty-square selected @@ -7212,6 +7211,7 @@ LeftClick (ClickType clickType, int xPix, int yPix) /* Don't animate move and drag both */ appData.animate = FALSE; } + MarkTargetSquares(1); // moves into holding are invalid for now (except in EditPosition, adapting to-square) if(x >= 0 && x < BOARD_LEFT || x >= BOARD_RGHT) { -- 1.7.0.4