]> git.lyx.org Git - features.git/commitdiff
Fix crash when using dialog with keyboard:
authorDekel Tsur <dekelts@tau.ac.il>
Fri, 21 Sep 2001 18:19:16 +0000 (18:19 +0000)
committerDekel Tsur <dekelts@tau.ac.il>
Fri, 21 Sep 2001 18:19:16 +0000 (18:19 +0000)
The problem also happen with other dialogs. For example, open the document
dialog, press alt+p (pagestyle), and press enter -> The pagestyle button
becomes empty. Furthermore, when pressing "Apply", lyx will crash.
I havn't fixed the other dialogs, because I don't know if my fix is good
(maybe there is a simple fix to the problem).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2788 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/xforms/ChangeLog
src/frontends/xforms/FormRef.C

index ab7b5e90b9e67941fce91a0f816599a6a03f3f15..d9a0e924714c5fe5ac72dfad940391c5130fbb13 100644 (file)
@@ -1,3 +1,7 @@
+2001-09-21  Dekel Tsur  <dekelts@tau.ac.il>
+
+       * FormRef.C (input): Fix crash when using dialog with keyboard.
+
 2001-09-20  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
 
        * forms/form_document.fd: small tweaks.
index b4a64c3e1bbe501bb3fc10c3c862c462a9d70291..909c8ec304ee7717b325daa73834e2f1dd15eed5 100644 (file)
@@ -197,6 +197,9 @@ ButtonPolicy::SMInput FormRef::input(FL_OBJECT * ob, long)
        } else if (ob == dialog_->button_update || 
                   ob == dialog_->sort ||
                   ob == dialog_->buffer) {
+               if (ob == dialog_->buffer &&
+                   fl_get_choice(dialog_->buffer) < 1)
+                       fl_set_choice(dialog_->buffer, 1);
 
                if (ob == dialog_->button_update ||
                    ob == dialog_->buffer) {
@@ -210,6 +213,8 @@ ButtonPolicy::SMInput FormRef::input(FL_OBJECT * ob, long)
                fl_unfreeze_form(form());
 
        } else if (ob == dialog_->type) {
+               if (fl_get_choice(dialog_->type) < 1)
+                       fl_set_choice(dialog_->type, 1);
 
                int const type = fl_get_choice(dialog_->type) - 1;
                if (controller().params().getCmdName() ==