Don't leave piece selected after piece menu
authorH.G. Muller <h.g.muller@hccnet.nl>
Thu, 16 Feb 2012 12:16:13 +0000 (13:16 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Fri, 17 Feb 2012 21:58:10 +0000 (22:58 +0100)
PieceMenuEvent left the just introduced piece selected, which is almost
never what one wants, as it makes it jump to the next square when selects.
Which is especially annoying if it captures the piece you wanted to grab...

backend.c

index d71b499..d08aea0 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -13909,6 +13909,8 @@ EditPositionMenuEvent (ChessSquare selection, int x, int y)
             } else
            boards[0][y][x] = selection;
            DrawPosition(TRUE, boards[0]);
+           ClearHighlights();
+           fromX = fromY = -1;
        }
        break;
     }