]> git.lyx.org Git - lyx.git/commitdiff
reverse Toc searching: use DocIterator instead of ParconsIterator.
authorAbdelrazak Younes <younes@lyx.org>
Fri, 16 May 2008 13:11:43 +0000 (13:11 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Fri, 16 May 2008 13:11:43 +0000 (13:11 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24800 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/TocModel.cpp

index 5acee8fd8315db8247ef796698b8a11477780a77..6d6198ed718505bcc4710a0d0e90b5affa6724bf 100644 (file)
 #include "Buffer.h"
 #include "BufferParams.h"
 #include "BufferView.h"
+#include "DocIterator.h"
 #include "Cursor.h"
 #include "FloatList.h"
 #include "FuncRequest.h"
 #include "LyXFunc.h"
-#include "ParIterator.h"
 #include "TextClass.h"
 
 #include "support/convert.h"
@@ -204,9 +204,9 @@ QModelIndex TocModels::currentIndex(int type) const
        if (type < 0 || !bv_)
                return QModelIndex();
 
-       ParConstIterator it(bv_->cursor());
-       return models_[type]->modelIndex(bv_->buffer().masterBuffer()->
-               tocBackend().item(fromqstr(types_[type]), it));
+       TocIterator const it = bv_->buffer().masterBuffer()->tocBackend().item(
+               fromqstr(types_[type]), bv_->cursor());
+       return models_[type]->modelIndex(it);
 }