From 09b61995c50278b6a11a159a54d24ea38ac88e87 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Wed, 24 Aug 2011 10:30:46 +0200 Subject: [PATCH] Fix display state after failed analysis attempt When an engine responded to the "analyze" command with an "unknown command" message, a Reset was done without altering the display, causing a discrepancy between display and internal state, which caused confusion when it finally corrected itself. I replaced the Reset call by an EditGameEvent call, to preserve the loaded game. The Reset was presumably used to allow for the case where the engine would be so upset by the analyze command that it needed to be reset by a "new" command, but this seems overly paranoic for an engine that just recognized the command as an unknown one. --- backend.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index a49155c..f4ac7f9 100644 --- a/backend.c +++ b/backend.c @@ -8268,7 +8268,8 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. if (StrStr(message, "analyze")) { cps->analysisSupport = FALSE; cps->analyzing = FALSE; - Reset(FALSE, TRUE); +// Reset(FALSE, TRUE); // [HGM] this caused discrepancy between display and internal state! + EditGameEvent(); // [HGM] try to preserve loaded game snprintf(buf2,MSG_SIZ, _("%s does not support analysis"), cps->tidy); DisplayError(buf2, 0); return; -- 1.7.0.4