diff --git a/src/frontends/qt4/QToc.cpp b/src/frontends/qt4/QToc.cpp index 67f1c81c32..f27677fc58 100644 --- a/src/frontends/qt4/QToc.cpp +++ b/src/frontends/qt4/QToc.cpp @@ -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)); } diff --git a/src/frontends/qt4/TocWidget.cpp b/src/frontends/qt4/TocWidget.cpp index 3edc839f54..7046dda2f2 100644 --- a/src/frontends/qt4/TocWidget.cpp +++ b/src/frontends/qt4/TocWidget.cpp @@ -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);