]> git.lyx.org Git - features.git/commitdiff
fix citation backward searching (bug 2002)
authorJürgen Spitzmüller <spitz@lyx.org>
Thu, 15 Sep 2005 10:48:14 +0000 (10:48 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Thu, 15 Sep 2005 10:48:14 +0000 (10:48 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10443 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt2/ChangeLog
src/frontends/qt2/QCitationDialog.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/FormCitation.C

index 4ec67b83e47d8313ed7c268da90059d7dfac6016..4ef87ef7e5f7bfe21db095297228bce46612120b 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-15  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
+
+       * QCitationDialog.C (find): correct start iterator when searching
+       backwards (bug 2002).
+
 2005-09-08  Angus Leeming  <leeming@lyx.org>
 
        * QPrefsDialog.C:
index 590f4da3cec232298a4d68a47da8719507c0de80..ed117f589ed12a41aca299601e74e49167c17a2c 100644 (file)
@@ -252,8 +252,6 @@ void QCitationDialog::find(biblio::Direction dir)
        // Find the NEXT instance...
        if (dir == biblio::FORWARD)
                start += 1;
-       else
-               start -= 1;
 
        bool const casesens = add_->searchCaseCB->isChecked();
        string const str = fromqstr(add_->searchED->text());
index 0e410d0e941cd17e7d25723c041ab1c782b76052..344a7a100607dc70f4d7f1c58132f5713e4fdd13 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-15  Jürgen Spitzmüller  <j.spitzmueller@gmx.de>
+
+       * FormCitation.C (findBiblio): correct start iterator when 
+       searching backwards (bug 2002).
+
 2005-09-08  Angus Leeming  <leeming@lyx.org>
 
        * FormPreferences.C:
index d0eda85cc9a96624b4be6a7930e4982ff5433f48..6e2c7d5dca60d90a4002bcde427b155317ce09dc 100644 (file)
@@ -247,7 +247,8 @@ void FormCitation::findBiblio(biblio::Direction const dir)
                start += sel - 1;
 
        // Find the NEXT instance...
-       (dir == biblio::FORWARD) ? ++start : --start;
+       if (dir == biblio::FORWARD)
+               start += 1;
 
 
        vector<string>::const_iterator const cit =