From: H.G. Muller Date: Mon, 5 Jul 2010 07:55:14 +0000 (+0200) Subject: Fix variant switch on PGN loading X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=35958a4e08bb03564ef2c98672a146e9c23365c7;p=xboard.git Fix variant switch on PGN loading When the PGN specified an essentially different variant, the piece bitmaps were not properly adapted, because the switch was done by calling InitPosition(), rather than Reset(). (The latter would destroy the PGN tags info.) We now added an explicit call to ResetFrontEnd(), (which is normally done from Reset()). --- diff --git a/backend.c b/backend.c index 95563f0..4db36c3 100644 --- a/backend.c +++ b/backend.c @@ -10188,6 +10188,7 @@ LoadGame(f, gameNumber, title, useList) /* [HGM] PGNvariant: automatically switch to variant given in PGN tag */ if(gameInfo.variant != oldVariant) { startedFromPositionFile = FALSE; /* [HGM] loadPos: variant switch likely makes position invalid */ + ResetFrontEnd(); // [HGM] might need other bitmaps. Cannot use Reset() because it clears gameInfo :-( InitPosition(TRUE); oldVariant = gameInfo.variant; if (appData.debugMode)