Fix bug: TOC depth slider wasn't reset when switching to empty documents.

This doubly fixes the previous bug, too.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26357 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-09-11 21:15:45 +00:00
parent e2b8ea875d
commit 7380e914d4

View File

@ -83,6 +83,8 @@ void TocModel::reset(Toc const & toc)
{ {
toc_ = &toc; toc_ = &toc;
if (toc_->empty()) { if (toc_->empty()) {
maxdepth_ = 0;
mindepth_ = 0;
reset(); reset();
return; return;
} }