From: H.G. Muller Date: Thu, 12 Apr 2012 21:58:41 +0000 (+0200) Subject: Move clearing of target squares to after drag end X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=4f6b19c0d9e3b6a2865aa5c53fd76ae044baf15a;p=xboard.git 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.) --- 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) {