mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
fix crash due to invalidated iterator
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13241 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5d14da2001
commit
36945644e7
@ -1,3 +1,8 @@
|
||||
2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* QCitationDialog.C (up, down): fix crash due to invalidated
|
||||
iterator.
|
||||
|
||||
2006-01-29 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* ui/LanguageModuleBase.ui: fix layout.
|
||||
|
@ -29,6 +29,7 @@
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
using std::swap;
|
||||
|
||||
namespace lyx {
|
||||
namespace frontend {
|
||||
@ -193,11 +194,10 @@ void QCitationDialog::up()
|
||||
string const tmp = *it;
|
||||
|
||||
selectedLB->removeItem(sel);
|
||||
form_->citekeys.erase(it);
|
||||
swap(form_->citekeys[sel - 1], form_->citekeys[sel]);
|
||||
|
||||
selectedLB->insertItem(toqstr(tmp), sel - 1);
|
||||
selectedLB->setSelected(sel - 1, true);
|
||||
form_->citekeys.insert(it - 1, tmp);
|
||||
|
||||
form_->changed();
|
||||
form_->fillStyles();
|
||||
@ -214,11 +214,10 @@ void QCitationDialog::down()
|
||||
string const tmp = *it;
|
||||
|
||||
selectedLB->removeItem(sel);
|
||||
form_->citekeys.erase(it);
|
||||
swap(form_->citekeys[sel + 1], form_->citekeys[sel]);
|
||||
|
||||
selectedLB->insertItem(toqstr(tmp), sel + 1);
|
||||
selectedLB->setSelected(sel + 1, true);
|
||||
form_->citekeys.insert(it + 1, tmp);
|
||||
|
||||
form_->changed();
|
||||
form_->fillStyles();
|
||||
|
@ -1,3 +1,8 @@
|
||||
2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* FormCitation.C (input): fix crash due to invalidated
|
||||
iterator.
|
||||
|
||||
2005-12-12 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* FormPreferences.C: fix off-by-x errors in paper size setting
|
||||
|
@ -30,6 +30,7 @@ using std::max;
|
||||
|
||||
using std::vector;
|
||||
using std::string;
|
||||
using std::swap;
|
||||
|
||||
|
||||
namespace lyx {
|
||||
@ -384,11 +385,10 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
||||
string const tmp = *it;
|
||||
|
||||
fl_delete_browser_line(dialog_->browser_cite, sel);
|
||||
citekeys.erase(it);
|
||||
swap(citekeys[sel - 2], citekeys[sel - 1]);
|
||||
|
||||
fl_insert_browser_line(dialog_->browser_cite, sel - 1, tmp.c_str());
|
||||
fl_select_browser_line(dialog_->browser_cite, sel - 1);
|
||||
citekeys.insert(it - 1, tmp);
|
||||
setCiteButtons(ON);
|
||||
activate = ButtonPolicy::SMI_VALID;
|
||||
|
||||
@ -402,11 +402,10 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
||||
string const tmp = *it;
|
||||
|
||||
fl_delete_browser_line(dialog_->browser_cite, sel);
|
||||
citekeys.erase(it);
|
||||
swap(citekeys[sel], citekeys[sel - 1]);
|
||||
|
||||
fl_insert_browser_line(dialog_->browser_cite, sel+1, tmp.c_str());
|
||||
fl_select_browser_line(dialog_->browser_cite, sel+1);
|
||||
citekeys.insert(it+1, tmp);
|
||||
setCiteButtons(ON);
|
||||
activate = ButtonPolicy::SMI_VALID;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user