]> git.lyx.org Git - features.git/commitdiff
Fix bug 3183 by Ozgur Ugras BARAN:
authorAbdelrazak Younes <younes@lyx.org>
Tue, 15 May 2007 17:02:10 +0000 (17:02 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Tue, 15 May 2007 17:02:10 +0000 (17:02 +0000)
* TocWidget::select()
    - Do not allow select ModelItem from the code for non-TOC types
    - add a FIXME explaining the situation.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18348 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/TocWidget.cpp

index 7046dda2f261f185035450a88196f55c5565a36f..3edc839f54286bab4f1bf5bb384e7e86b6c28511 100644 (file)
@@ -206,6 +206,12 @@ 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);