From fd1000efa5cb589e1446a4e1cfb0b4d222b0f65d Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 4 Jul 2011 10:45:04 +0200 Subject: [PATCH] Improve -showTargetSquares on click-click moves The markers on move targets are now kept when a first click merely selects a piece, rather than dragging it elsewhere. The second click (by definition on the to-square) then clears the markers. --- backend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index 15af6e7..e08e829 100644 --- a/backend.c +++ b/backend.c @@ -6805,7 +6805,6 @@ void LeftClick(ClickType clickType, int xPix, int yPix) } if (clickType == Press) ErrorPopDown(); - MarkTargetSquares(1); x = EventToSquare(xPix, BOARD_WIDTH); y = EventToSquare(yPix, BOARD_HEIGHT); @@ -6920,6 +6919,7 @@ void LeftClick(ClickType clickType, int xPix, int yPix) /* Clicked again on same color piece -- changed his mind */ second = (x == fromX && y == fromY); promoDefaultAltered = FALSE; + MarkTargetSquares(1); if(!second || appData.oneClick && !OnlyMove(&x, &y, TRUE)) { if (appData.highlightDragging) { SetHighlights(x, y, -1, -1); @@ -6986,6 +6986,7 @@ void 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 -- 1.7.0.4