mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
code cosmetics to the iterator fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13242 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
36945644e7
commit
414a11684e
@ -1,3 +1,7 @@
|
||||
2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* QCitationDialog.C (up, down): get rid of the iterator.
|
||||
|
||||
2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* QCitationDialog.C (up, down): fix crash due to invalidated
|
||||
|
@ -189,9 +189,10 @@ void QCitationDialog::up()
|
||||
{
|
||||
int const sel = selectedLB->currentItem();
|
||||
|
||||
BOOST_ASSERT(sel > 0);
|
||||
|
||||
// Move the selected key up one line
|
||||
vector<string>::iterator it = form_->citekeys.begin() + sel;
|
||||
string const tmp = *it;
|
||||
string const tmp = form_->citekeys[sel];
|
||||
|
||||
selectedLB->removeItem(sel);
|
||||
swap(form_->citekeys[sel - 1], form_->citekeys[sel]);
|
||||
@ -209,9 +210,10 @@ void QCitationDialog::down()
|
||||
{
|
||||
int const sel = selectedLB->currentItem();
|
||||
|
||||
BOOST_ASSERT(sel < (int)form_->citekeys.size());
|
||||
|
||||
// Move the selected key down one line
|
||||
vector<string>::iterator it = form_->citekeys.begin() + sel;
|
||||
string const tmp = *it;
|
||||
string const tmp = form_->citekeys[sel];
|
||||
|
||||
selectedLB->removeItem(sel);
|
||||
swap(form_->citekeys[sel + 1], form_->citekeys[sel]);
|
||||
|
@ -1,3 +1,7 @@
|
||||
2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* FormCitation.C (input): get rid of the iterator.
|
||||
|
||||
2006-02-15 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* FormCitation.C (input): fix crash due to invalidated
|
||||
|
@ -381,8 +381,7 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
||||
return ButtonPolicy::SMI_NOOP;
|
||||
|
||||
// Move the selected key up one line
|
||||
vector<string>::iterator it = citekeys.begin() + sel - 1;
|
||||
string const tmp = *it;
|
||||
string const tmp = citekeys[sel - 1];
|
||||
|
||||
fl_delete_browser_line(dialog_->browser_cite, sel);
|
||||
swap(citekeys[sel - 2], citekeys[sel - 1]);
|
||||
@ -398,8 +397,7 @@ ButtonPolicy::SMInput FormCitation::input(FL_OBJECT * ob, long)
|
||||
return ButtonPolicy::SMI_NOOP;
|
||||
|
||||
// Move the selected key down one line
|
||||
vector<string>::iterator it = citekeys.begin() + sel - 1;
|
||||
string const tmp = *it;
|
||||
string const tmp = citekeys[sel - 1];
|
||||
|
||||
fl_delete_browser_line(dialog_->browser_cite, sel);
|
||||
swap(citekeys[sel], citekeys[sel - 1]);
|
||||
|
Loading…
Reference in New Issue
Block a user