Clear highlights after moving piece in Edit Position
authorH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 3 Feb 2016 08:23:15 +0000 (09:23 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Wed, 3 Feb 2016 08:23:15 +0000 (09:23 +0100)
When moving a piece during Edit position the from-square remained
highlighted, but the to square was not highlighted, which would
create the erroneous impression that the (now-empty) from-square
was selected (and ready to obliterate a piece on the next click).
Now this highlight is cleared. This was preferred over also highlighting
the to-square, because this is not really a move in a game.

backend.c

index 2ccc54d..48a625a 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -7095,6 +7095,7 @@ UserMoveEvent(int fromX, int fromY, int toX, int toY, int promoChar)
                }
            } else
            boards[0][fromY][fromX] = gatingPiece;
                }
            } else
            boards[0][fromY][fromX] = gatingPiece;
+           ClearHighlights();
            DrawPosition(FALSE, boards[currentMove]);
            return;
        }
            DrawPosition(FALSE, boards[currentMove]);
            return;
        }