From 4c2bb34877aa8af1b1ace3fa074a4e7edd2abc91 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 10 Mar 2013 12:43:59 +0100 Subject: [PATCH] Fix disappearence of pieces that were moved illegally Dragging damages the from-square, but it is not marked as such, because selective board redraws to update highlights and such would draw the piece that is really still there, making it flash on the from-square before the position after the move is drawn. This, however, backfires when the move was illegal, as then there is no draw of a new position, and the from-square stays empty. For now this is solved by making DisplayMoveError() order a total redraw. (As this is rare, only done in case of an error, and might even throw up a pop-up, the performance cost of this is acceptable.) --- dialogs.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dialogs.c b/dialogs.c index 6db2b3c..899bf71 100644 --- a/dialogs.c +++ b/dialogs.c @@ -1874,7 +1874,7 @@ DisplayMoveError (String message) { fromX = fromY = -1; ClearHighlights(); - DrawPosition(FALSE, NULL); + DrawPosition(TRUE, NULL); // selective redraw would miss the from-square of the rejected move, displayed empty after drag, but not marked damaged! if (appData.debugMode || appData.matchMode) { fprintf(stderr, "%s: %s\n", programName, message); } -- 1.7.0.4