Correctly remember checkboxes on Continue Later (WB)
[xboard.git] / winboard / wsettings.c
index 9c4c967..ba9488b 100644 (file)
@@ -1,7 +1,7 @@
 /*\r
  * woptions.h -- Options dialog box routines for WinBoard\r
  *\r
- * Copyright 2003, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc.\r
+ * Copyright 2003, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc.\r
  *\r
  * ------------------------------------------------------------------------\r
  *\r
@@ -893,6 +893,10 @@ void PseudoOK(HWND hDlg)
 \r
     if(autoinc) appData.loadGameIndex = appData.loadPositionIndex = -(twice + 1); else\r
     if(!appData.loadGameFile[0]) appData.loadGameIndex = -2*twice; // kludge to pass value of "twice" for use in GUI book\r
+    if(!autoinc && !twice) { // prevent auto-inc being remembered in index value if checkboxes not ticked\r
+       if(appData.loadGameIndex < 0) appData.loadGameIndex = 0;\r
+       if(appData.loadPositionIndex < 0) appData.loadPositionIndex = 0;\r
+    }\r
     if(swiss) { appData.defaultMatchGames = 1; appData.tourneyType = -1; }\r
 }\r
 \r