From: H.G. Muller Date: Mon, 31 Jan 2011 22:03:05 +0000 (+0100) Subject: Fix deselection of greyed-out variant button (WB) X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=e5c6d13c4b6b683419f22274f9926cbee67d68f0;p=xboard.git Fix deselection of greyed-out variant button (WB) In Windows a disabled radiobutton refuses to deselect when you select another (enabled) button from the group. There are then 2 buttons checked, and the code to readout the buttons took the first one. Now it is changed to take the first enabled one. --- diff --git a/winboard/woptions.c b/winboard/woptions.c index 03210c4..cf5967d 100644 --- a/winboard/woptions.c +++ b/winboard/woptions.c @@ -807,7 +807,8 @@ VariantWhichRadio(HWND hDlg) int i=0, j; while((j = radioButton[i++]) != -2) { if(j == -1) continue; // no menu button - if(IsDlgButtonChecked(hDlg, j)) return (VariantClass) i-1; + if(IsDlgButtonChecked(hDlg, j) && + (appData.noChessProgram || strstr(first.variants, VariantName(i-1)))) return (VariantClass) i-1; } return gameInfo.variant; // If no button checked, keep old }