* src/frontends/qt4/QTocDialog.C (updateGui):

- disable depth slider when there's no content (prevents crash).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16575 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Jürgen Spitzmüller 2007-01-07 16:39:35 +00:00
parent 47e8e30eb1
commit 7bd88b5056

View File

@ -221,6 +221,7 @@ void QTocDialog::updateGui()
typeCO->setModel(type_model); typeCO->setModel(type_model);
tocTV->setModel(new QStandardItemModel); tocTV->setModel(new QStandardItemModel);
tocTV->setEditTriggers(QAbstractItemView::NoEditTriggers); tocTV->setEditTriggers(QAbstractItemView::NoEditTriggers);
depthSL->setEnabled(false);
return; return;
} }
@ -242,6 +243,7 @@ void QTocDialog::updateGui()
enableButtons(); enableButtons();
reconnectSelectionModel(); reconnectSelectionModel();
depthSL->setEnabled(true);
depthSL->setMaximum(form_->getTocDepth()); depthSL->setMaximum(form_->getTocDepth());
setTreeDepth(); setTreeDepth();
select(form_->getCurrentIndex()); select(form_->getCurrentIndex());