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.