From f3a5e498cf34b4f2f0a1edc54432a04ea320949a Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Thu, 8 Mar 2012 11:11:03 +0100 Subject: [PATCH] Limit premove cancelling to click on from square On second thought it might be better to limit cancellation of the premove to up-clicks on the premove from-square. (Presumably this will be a static click, but if the down-click was elsewhere, a new move most have been entered, which would clear the existing premove anyway.) This allows the user to already grab another piece that he wants to move after premove, or when premove is rejected. --- backend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index d1f3b04..f420925 100644 --- a/backend.c +++ b/backend.c @@ -6886,7 +6886,8 @@ LeftClick (ClickType clickType, int xPix, int yPix) || x == BOARD_RGHT+1 && y >= gameInfo.holdingsSize) ) return; - if(gotPremove && clickType == Press) { // user starts something after premove has been entered: abort premove as side effect + if(gotPremove && x == premoveFromX && y == premoveFromY && clickType == Release) { + // could be static click on premove from-square: abort premove gotPremove = 0; ClearPremoveHighlights(); } -- 1.7.0.4