X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwsettings.c;h=eb04e418b7e3e7c02986abad65a6120ac9c7ef98;hb=87de8ff524ffdde57cf2cd1a92c44a3a9377e28d;hp=215ea189c89c0b2345754a315c8e5811656bfb33;hpb=5fcd68c64763478d3e05f58d4c21508e8dab97d5;p=xboard.git diff --git a/winboard/wsettings.c b/winboard/wsettings.c index 215ea18..eb04e41 100644 --- a/winboard/wsettings.c +++ b/winboard/wsettings.c @@ -1,7 +1,7 @@ /* * woptions.h -- Options dialog box routines for WinBoard * - * Copyright 2003, 2009, 2010, 2011, 2012, 2013, 2014 Free Software Foundation, Inc. + * Copyright 2003, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Free Software Foundation, Inc. * * ------------------------------------------------------------------------ * @@ -575,8 +575,8 @@ void AddOption(int x, int y, Control type, int i) int extra, num = ES_NUMBER; switch(type) { -// case Slider+100: -// num = 0; // needs text control for accepting negative numbers + case Spin+100: + num = 0; // needs text control for accepting negative numbers case Slider: case Spin: AddControl(x, y+1, 95, 9, 0x0082, SS_ENDELLIPSIS | WS_VISIBLE | WS_CHILD, i); @@ -886,6 +886,7 @@ int MatchOK() void PseudoOK(HWND hDlg) { + if(matchMode) return; okFunc = 0; GetOptionValues(hDlg, activeCps, activeList); EndDialog( hDlg, 0 ); @@ -893,7 +894,12 @@ 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; } + ASSIGN(appData.tourneyFile, tfName); } char *GetParticipants(HWND hDlg)