From 6ae4cea03c0da1fa1d3e3ecd3ffddc17931cc852 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 4c30250..12c847d 100644 --- a/backend.c +++ b/backend.c @@ -7223,7 +7223,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 { @@ -7273,6 +7273,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