]> git.lyx.org Git - features.git/commitdiff
Fix assertion with LOF and LOT by transfering the test from TocWidget::select() to...
authorAbdelrazak Younes <younes@lyx.org>
Tue, 15 May 2007 18:01:22 +0000 (18:01 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 15 May 2007 18:01:22 +0000 (18:01 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18355 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/QToc.cpp
src/frontends/qt4/TocWidget.cpp

index 67f1c81c3210fc9e1b0045206c916df06bc87330..f27677fc583e17aef7a35dcf8aa6cd40f5baf1aa 100644 (file)
@@ -81,6 +81,12 @@ QModelIndex const QToc::getCurrentIndex(int type) const
        if (type < 0)
                return QModelIndex();
 
+       // FIXME: The TocBackend infrastructure is not ready for LOF and LOT
+       // This is because a proper ParConstIterator is not constructed in
+       // InsetCaption::addToToc()
+       if(!canOutline(type))
+               return QModelIndex();
+
        return toc_models_[type]->modelIndex(getCurrentTocItem(type));
 }
 
index 3edc839f54286bab4f1bf5bb384e7e86b6c28511..7046dda2f261f185035450a88196f55c5565a36f 100644 (file)
@@ -206,12 +206,6 @@ void TocWidget::select(QModelIndex const & index)
                return;
        }
 
-       // FIXME: The TocBackend infrastructure is not ready for LOF and LOT
-       // This is because a proper ParConstIterator is not constructed in
-       // InsetCaption::addToToc()
-       if(!form_->canOutline(typeCO->currentIndex()))
-               return;
-
        disconnectSelectionModel();
        tocTV->setCurrentIndex(index);
        tocTV->scrollTo(index);