Clear highlights and targets when accepting setup command
authorH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 1 Jan 2020 19:10:07 +0000 (20:10 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 1 Jan 2020 19:15:58 +0000 (20:15 +0100)
Any form of highlighting should no longer apply when the engine orders
a new position, and the next click will be selection of a piece to move.

backend.c

index c0e4139..a5c189b 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -9374,6 +9374,7 @@ FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book h
       ParseFEN(boards[0], &dummy, message+s, FALSE);
       CopyBoard(initialPosition, boards[0]);
       if(startedFromSetupPosition) { CopyBoard(boards[0], tmp); return; }
+      MarkTargetSquares(1); ClearHighlights();
       DrawPosition(TRUE, boards[0]);
       if(gameInfo.variant != VariantPrelude) startedFromSetupPosition = TRUE;
       return;