Reset move entry on Clear Board
[xboard.git] / backend.c
index 8c5ac40..fe70fd2 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -8893,6 +8893,7 @@ FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book h
       if(startedFromSetupPosition) return;
       ParseFEN(boards[0], &dummy, message+s, FALSE);
       DrawPosition(TRUE, boards[0]);
+      CopyBoard(initialPosition, boards[0]);
       startedFromSetupPosition = TRUE;
       return;
     }
@@ -15077,6 +15078,8 @@ EditPositionMenuEvent (ChessSquare selection, int x, int y)
 
     switch (selection) {
       case ClearBoard:
+       fromX = fromY = killX = killY = -1; // [HGM] abort any move entry in progress
+       MarkTargetSquares(1);
        CopyBoard(currentBoard, boards[0]);
        CopyBoard(menuBoard, initialPosition);
        if (gameMode == IcsExamining && ics_type == ICS_FICS) {