]> git.lyx.org Git - features.git/commitdiff
Fix loop search in cite dialog. Also info update fix.
authorEdwin Leuven <e.leuven@gmail.com>
Mon, 22 Jul 2002 15:30:24 +0000 (15:30 +0000)
committerEdwin Leuven <e.leuven@gmail.com>
Mon, 22 Jul 2002 15:30:24 +0000 (15:30 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4743 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QCitationDialog.C
src/frontends/qt2/TODO

index 9d97b83414cb1b45910f30a02f523588a67a249d..8335dc47105bfe896af407f5a94129503ef4fa3b 100644 (file)
@@ -1,3 +1,8 @@
+2002-07-22  Edwin Leuven  <leuven@fee.uva.nl>
+
+       * QCitationDialog.C: fix loop search and info update after selecting
+       * TODO: remove this is issue
+
 2002-07-22  Edwin Leuven  <leuven@fee.uva.nl>
 
        * ui/QBibtexDialog.ui: style browser
index 55f333c7e16e3a313c37f37d78d70a28f7972249..6f9f32c1dd63574229823e268f07a36238e95ce1 100644 (file)
@@ -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<string>::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;
index 16304daa8303d179da93ed03f3af87087110d826..0069c95277abefcaeb34d922355620ded9c8daf9 100644 (file)
@@ -26,10 +26,6 @@ QAbout
 
        - give good default size 
 
-QCitation
-
-       - loop round searching not working perhaps ??
-
 QCommandBuffer
 
        - finish off, use listview etc.