From 0c319b0184e2b431cbf381096e1849f23053cad6 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Sun, 28 Feb 2016 12:01:40 +0100 Subject: [PATCH] Fix disappearance of premoved piece When a premove was done by dragging, (which for expected recaptures would be the only way, as click-click moving selects the intended target), the moved piece would disappear from view. This because the from-square would not be redrawn (in normal move execution it would remain empty). This could have been an XBoard-only problem. In any case We now force a complete redraw of the board, which is not very elegant, but should always fix it. --- backend.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index 0624dac..7243ee7 100644 --- a/backend.c +++ b/backend.c @@ -7051,6 +7051,7 @@ UserMoveEvent (int fromX, int fromY, int toX, int toY, int promoChar) "fromY %d, toX %d, toY %d\n", fromX, fromY, toX, toY); } + DrawPosition(TRUE, boards[currentMove]); // [HGM] repair animation damage done by premove (in particular emptying from-square) return; } break; @@ -7072,6 +7073,7 @@ UserMoveEvent (int fromX, int fromY, int toX, int toY, int promoChar) "fromY %d, toX %d, toY %d\n", fromX, fromY, toX, toY); } + DrawPosition(TRUE, boards[currentMove]); return; } break; -- 1.7.0.4