mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Fix assertion with LOF and LOT by transfering the test from TocWidget::select() to QToc::getCurrentIndex().
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18355 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4912255342
commit
ff19dcb49c
@ -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));
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user