Fix deselection of greyed-out variant button (WB)
[xboard.git] / winboard / woptions.c
index 03210c4..cf5967d 100644 (file)
@@ -807,7 +807,8 @@ VariantWhichRadio(HWND hDlg)
   int i=0, j;\r
   while((j = radioButton[i++]) != -2) {\r
        if(j == -1) continue; // no menu button\r
-       if(IsDlgButtonChecked(hDlg, j)) return (VariantClass) i-1;\r
+       if(IsDlgButtonChecked(hDlg, j) &&\r
+          (appData.noChessProgram || strstr(first.variants, VariantName(i-1)))) return (VariantClass) i-1;\r
   }\r
   return gameInfo.variant; // If no button checked, keep old\r
 }\r