From: H.G.Muller Date: Sun, 28 Feb 2016 11:01:40 +0000 (+0100) Subject: Fix disappearance of premoved piece X-Git-Url: http://winboard.nl/cgi-bin?p=xboard.git;a=commitdiff_plain;h=0c319b0184e2b431cbf381096e1849f23053cad6 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. --- 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;