From: H.G. Muller Date: Sun, 10 Mar 2013 11:43:59 +0000 (+0100) Subject: Fix disappearence of pieces that were moved illegally X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=4c2bb34877aa8af1b1ace3fa074a4e7edd2abc91;p=xboard.git 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.) --- 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); }