From: Edwin Leuven Date: Mon, 22 Jul 2002 15:30:24 +0000 (+0000) Subject: Fix loop search in cite dialog. Also info update fix. X-Git-Tag: 1.6.10~18788 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=da2d5f90530cba5455649bcd5af4bd241fe34a7f;p=features.git Fix loop search in cite dialog. Also info update fix. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4743 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/qt2/ChangeLog b/src/frontends/qt2/ChangeLog index 9d97b83414..8335dc4710 100644 --- a/src/frontends/qt2/ChangeLog +++ b/src/frontends/qt2/ChangeLog @@ -1,3 +1,8 @@ +2002-07-22 Edwin Leuven + + * QCitationDialog.C: fix loop search and info update after selecting + * TODO: remove this is issue + 2002-07-22 Edwin Leuven * ui/QBibtexDialog.ui: style browser diff --git a/src/frontends/qt2/QCitationDialog.C b/src/frontends/qt2/QCitationDialog.C index 55f333c7e1..6f9f32c1dd 100644 --- a/src/frontends/qt2/QCitationDialog.C +++ b/src/frontends/qt2/QCitationDialog.C @@ -156,6 +156,7 @@ void QCitationDialog::slotAddClicked() int const n = int(form_->citekeys.size()); citeLB->setSelected(n - 1, true); + slotBibHighlighted(sel); form_->setBibButtons(QCitation::OFF); form_->setCiteButtons(QCitation::ON); form_->changed(); @@ -265,23 +266,22 @@ void QCitationDialog::doFind(biblio::Direction dir) vector::const_iterator cit = biblio::searchKeys(theMap, form_->bibkeys, str, - start, type, dir, caseSensitive); + start, type, dir, caseSensitive); - // FIXME: should work ... + // not found. let's loop round if (cit == form_->bibkeys.end()) { - // not found. let's loop round - if (dir == biblio::FORWARD) + if (dir == biblio::FORWARD) { start = form_->bibkeys.begin(); - else - start = form_->bibkeys.end(); + } + else start = form_->bibkeys.end() - 1; cit = biblio::searchKeys(theMap, form_->bibkeys, str, - start, type, dir, caseSensitive); + start, type, dir, caseSensitive); if (cit == form_->bibkeys.end()) return; } - + int const found = int(cit - form_->bibkeys.begin()); if (found == sel) { return; diff --git a/src/frontends/qt2/TODO b/src/frontends/qt2/TODO index 16304daa83..0069c95277 100644 --- a/src/frontends/qt2/TODO +++ b/src/frontends/qt2/TODO @@ -26,10 +26,6 @@ QAbout - give good default size -QCitation - - - loop round searching not working perhaps ?? - QCommandBuffer - finish off, use listview etc.