X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=backend.c;h=48a625a85f03dc988d334ea0abeddd1a7adebefc;hb=cd63bf5b43dae0ac9d9ae1efaba0e23270f65760;hp=fd730e947baa873b374d67c835b3b3ecee985d55;hpb=ec51c847ed215b286d5ca730a4984819403d5194;p=xboard.git diff --git a/backend.c b/backend.c index fd730e9..48a625a 100644 --- 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; + ClearHighlights(); DrawPosition(FALSE, boards[currentMove]); return; } @@ -7792,6 +7793,8 @@ LeftClick (ClickType clickType, int xPix, int yPix) ClearHighlights(); } #endif + if(PieceToChar(CHUPROMOTED(boards[currentMove][fromY][fromX])) == '+') + defaultPromoChoice = CHUPROMOTED(boards[currentMove][fromY][fromX]); if(gameInfo.variant == VariantChuChess && piece != WhitePawn && piece != BlackPawn) defaultPromoChoice = piece; if(marker[y][x] == 5) { // [HGM] lion: this was the release of a to-click or drag on a cyan square dragging *= 2; // flag button-less dragging if we are dragging