From: H.G. Muller Date: Wed, 24 Aug 2011 08:30:46 +0000 (+0200) Subject: Fix display state after failed analysis attempt X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=09b61995c50278b6a11a159a54d24ea38ac88e87;p=xboard.git 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. --- 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;