]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormBase.C
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormBase.C
index bfee6f8bd95ddc3bf975362956aef07cc2f37a2d..ecd0cfbc42582c6e58fd218288c2ccab670092dc 100644 (file)
@@ -99,6 +99,12 @@ void FormBase::hide()
 
 void FormBase::InputCB(FL_OBJECT * ob, long data)
 {
+       // 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);
+       }
+
        bc().input(input(ob, data));
 }