]> git.lyx.org Git - features.git/commitdiff
* TocBackend::item(): fix toc navigation bug by using DocIterator instead of ParConst...
authorAbdelrazak Younes <younes@lyx.org>
Fri, 16 May 2008 15:06:26 +0000 (15:06 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 16 May 2008 15:06:26 +0000 (15:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24804 a592a061-630c-0410-9148-cb99ea01b6c8

src/TocBackend.cpp

index f2fabd9bdca4fe06767653a15ca5ed3288215d73..e1a5416e14f3232ebc164d893a17fef3f57491f8 100644 (file)
@@ -217,20 +217,20 @@ TocIterator TocBackend::item(string const & type,
 
        --it;
 
-       ParConstIterator par_it_text(dit);
-       if (par_it_text.inMathed()) {
+       DocIterator dit_text = dit;
+       if (dit_text.inMathed()) {
                // We are only interested in text so remove the math CursorSlice.
-               while (par_it_text.inMathed())
-                       par_it_text.pop_back();
+               while (dit_text.inMathed())
+                       dit_text.pop_back();
        }
 
        for (; it != last; --it) {
                // We verify that we don't compare contents of two
                // different document. This happens when you
                // have parent and child documents.
-               if (&it->dit_[0].inset() != &par_it_text[0].inset())
+               if (&it->dit_[0].inset() != &dit_text[0].inset())
                        continue;
-               if (it->dit_ <= par_it_text)
+               if (it->dit_ <= dit_text)
                        return it;
        }