From ede276c731daeaa794b9741fff680f1e97fbb911 Mon Sep 17 00:00:00 2001 From: H.G.Muller Date: Mon, 3 Aug 2015 20:39:31 +0200 Subject: [PATCH] Correctly remember checkboxes on Continue Later (WB) The WinBoard tournament dialog could be left in an inconsistent state on Continue Later, when the user untickedthe checkboxes for auto-stepping and two games per line, after on an earlier attempt their ticking had already resulted in settng the line/position index to a negative value. Negative values left in the numeric entriesare now reset to 0 when the chackboxes are unticked. --- winboard/wsettings.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/winboard/wsettings.c b/winboard/wsettings.c index 6cf8d59..ba9488b 100644 --- a/winboard/wsettings.c +++ b/winboard/wsettings.c @@ -893,6 +893,10 @@ void PseudoOK(HWND hDlg) if(autoinc) appData.loadGameIndex = appData.loadPositionIndex = -(twice + 1); else if(!appData.loadGameFile[0]) appData.loadGameIndex = -2*twice; // kludge to pass value of "twice" for use in GUI book + if(!autoinc && !twice) { // prevent auto-inc being remembered in index value if checkboxes not ticked + if(appData.loadGameIndex < 0) appData.loadGameIndex = 0; + if(appData.loadPositionIndex < 0) appData.loadPositionIndex = 0; + } if(swiss) { appData.defaultMatchGames = 1; appData.tourneyType = -1; } } -- 1.7.0.4