From f9f3643ce3447c431ee266ff241cad393872d416 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 15 Feb 2015 23:17:29 +0100 Subject: [PATCH] Fix click-click sweep-select If the up-click of the second click of a sweep-select would occur in the from-square, the whole move would be ignored, and de-select the promoting piece instead. --- backend.c | 7 +++---- 1 files changed, 3 insertions(+), 4 deletions(-) diff --git a/backend.c b/backend.c index 4974fed..71a795c 100644 --- a/backend.c +++ b/backend.c @@ -7574,7 +7574,7 @@ printf("A type=%d\n",clickType); return; } - if (clickType == Release && x == fromX && y == fromY && killX < 0) { + if (clickType == Release && x == fromX && y == fromY && killX < 0 && !sweepSelecting) { DragPieceEnd(xPix, yPix); dragging = 0; if(clearFlag) { // a deferred attempt to click-click move an empty square on top of a piece @@ -7588,10 +7588,9 @@ printf("A type=%d\n",clickType); /* Undo animation damage if any */ DrawPosition(FALSE, NULL); } - if (second || sweepSelecting) { + if (second) { /* Second up/down in same square; just abort move */ - if(sweepSelecting) DrawPosition(FALSE, boards[currentMove]); - second = sweepSelecting = 0; + second = 0; fromX = fromY = -1; gatingPiece = EmptySquare; MarkTargetSquares(1); -- 1.7.0.4