From 35958a4e08bb03564ef2c98672a146e9c23365c7 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 5 Jul 2010 09:55:14 +0200 Subject: [PATCH] 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()). --- backend.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) 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) -- 1.7.0.4