From: H.G.Muller Date: Sun, 15 Feb 2015 22:17:29 +0000 (+0100) Subject: Fix click-click sweep-select X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=f9f3643ce3447c431ee266ff241cad393872d416 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. --- 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);