From e96d03de440ac32bae79ce83eccdd1a20280c7b9 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 26 Aug 2013 14:40:57 +0200 Subject: [PATCH] Fix grabbing of selected piece A second static click on a selected piece should deselect it, but an attempt to drag an already selected piece should not 'bounce off'. It was already possible to move a selected piece to another square, but the dragging was not animated. This is now fixed, by only skipping the code to start dragging when the second click is part of the only-move double-click for only capture. (Before it was skipped on any second click.) --- backend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index 1e9787e..575fc26 100644 --- a/backend.c +++ b/backend.c @@ -7207,7 +7207,7 @@ LeftClick (ClickType clickType, int xPix, int yPix) } promoDefaultAltered = FALSE; MarkTargetSquares(1); - if(!second || appData.oneClick && !OnlyMove(&x, &y, TRUE)) { + if(!(second && appData.oneClick && OnlyMove(&x, &y, TRUE))) { if (appData.highlightDragging) { SetHighlights(x, y, -1, -1); } else { @@ -7257,6 +7257,7 @@ LeftClick (ClickType clickType, int xPix, int yPix) second = sweepSelecting = 0; fromX = fromY = -1; gatingPiece = EmptySquare; + MarkTargetSquares(1); ClearHighlights(); gotPremove = 0; ClearPremoveHighlights(); -- 1.7.0.4