]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormBaseDeprecated.C
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormBaseDeprecated.C
index bd661f10c15b9464c502c791f454d82badd2776b..c020a59cb1e79f41919af04b64f00a8e677ded6a 100644 (file)
@@ -202,6 +202,13 @@ void FormBaseDeprecated::InputCB(FL_OBJECT * ob, long data)
        FormBaseDeprecated * pre =
                static_cast<FormBaseDeprecated*>(ob->form->u_vdata);
        lyx::Assert(pre);
+
+       // It is possible to set the choice to 0 when using the
+       // keyboard shortcuts. This work-around deals with the problem.
+       if (ob && ob->objclass == FL_CHOICE && fl_get_choice(ob) < 1) {
+               fl_set_choice(ob, 1);
+       }
+
        pre->bc().valid(pre->input(ob, data));
 }