mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Ensure that the choice is always valid, thus fixing a crash.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4072 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
66c63a89ef
commit
cab361310e
@ -1,3 +1,7 @@
|
||||
2002-04-22 Angus Leeming <a.leeming@ic.ac.uk>
|
||||
|
||||
* FormCitation.C (apply, input): ensure that the choice is always valid.
|
||||
|
||||
2002-04-23 Juergen Spitzmueller <j.spitzmueller@gmx.de>
|
||||
|
||||
* FormBibtex.C: Do not use a blank after the comma for multiple
|
||||
|
@ -126,7 +126,7 @@ void FormCitation::apply()
|
||||
ControlCitation::getCiteStyles();
|
||||
|
||||
int const choice =
|
||||
fl_get_choice(dialog_->choice_style) - 1;
|
||||
std::max(0, fl_get_choice(dialog_->choice_style) - 1);
|
||||
bool const full =
|
||||
fl_get_button(dialog_->check_full_author_list);
|
||||
bool const force =
|
||||
@ -429,7 +429,7 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
||||
currentCitekey = citekeys[0];
|
||||
|
||||
if (topCitekey != currentCitekey) {
|
||||
int choice = fl_get_choice(dialog_->choice_style);
|
||||
int choice = std::max(1, fl_get_choice(dialog_->choice_style));
|
||||
fillChoice(dialog_.get(),
|
||||
controller().getCiteStrings(currentCitekey));
|
||||
fl_set_choice(dialog_->choice_style, choice);
|
||||
|
Loading…
Reference in New Issue
Block a user