Correctly enable/disable the filter label and textfield in the TocWidget. Also, shorten the code a bit.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@34350 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Vincent van Ravesteijn 2010-04-30 15:56:54 +00:00
parent d7b4aacb2e
commit b24862e754

View File

@ -388,21 +388,15 @@ void TocWidget::enableControls(bool enable)
void TocWidget::updateView()
{
if (!gui_view_.documentBufferView()) {
enableControls(false);
typeCO->setEnabled(false);
tocTV->setModel(0);
tocTV->setEnabled(false);
depthSL->setMaximum(0);
depthSL->setValue(0);
persistentCB->setEnabled(false);
sortCB->setEnabled(false);
depthSL->setEnabled(false);
setEnabled(false);
return;
}
setEnabled(true);
bool const is_sortable = isSortable();
sortCB->setEnabled(is_sortable);
depthSL->setEnabled(true);
typeCO->setEnabled(true);
bool focus_ = tocTV->hasFocus();
tocTV->setEnabled(false);
tocTV->setUpdatesEnabled(false);