Fix crash when using dialog with keyboard:

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
This commit is contained in:
Dekel Tsur 2001-09-21 18:19:16 +00:00
parent 98f2f8799e
commit 1981eeb134
2 changed files with 9 additions and 0 deletions

View 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.

View 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() ==