From: Daniel Mehrmann Date: Mon, 28 Jun 2004 18:23:14 +0000 (+0000) Subject: bugfix: User close analysis windows while active ics analyze + message shows action X-Git-Tag: v4.2.8~30 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=79905104bfab0a345e551c66b2e56fe4b4a69acf;p=xboard.git bugfix: User close analysis windows while active ics analyze + message shows action --- diff --git a/winboard/winboard.c b/winboard/winboard.c index 034e598..55a5b00 100644 --- a/winboard/winboard.c +++ b/winboard/winboard.c @@ -3652,7 +3652,6 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) if (appData.icsEngineAnalyze) { if (appData.debugMode) fprintf(debugFP, "Found unexpected active ICS engine analyze \n"); - appData.icsEngineAnalyze = FALSE; ExitAnalyzeMode(); ModeHighlight(); break; @@ -3661,7 +3660,6 @@ WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) } else { /* if enable, user want disable icsEngineAnalyze */ if (appData.icsEngineAnalyze) { - appData.icsEngineAnalyze = FALSE; ExitAnalyzeMode(); ModeHighlight(); break; @@ -7614,6 +7612,12 @@ AnalysisDialog(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) case WM_COMMAND: /* message: received a command */ switch (LOWORD(wParam)) { case IDCANCEL: + /* icsEngineAnalyze */ + if (appData.icsActive && appData.icsEngineAnalyze) { + ExitAnalyzeMode(); + ModeHighlight(); + return TRUE; + } EditGameEvent(); return TRUE; default: