Re-order things a little bit.

This commit is contained in:
Richard Heck 2013-03-27 17:17:57 -04:00
parent 050142de1b
commit 2d34e48869

View File

@ -245,10 +245,6 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
return docstring();
}
// with lists of listings, at least, there is no depth
// to worry about. so the code can be simpler.
bool const use_depth = (command == "tableofcontents");
Layout const & lay = buffer().params().documentClass().htmlTOCLayout();
string const & tocclass = lay.defaultCSSClass();
string const tocattr = "class='tochead " + tocclass + "'";
@ -271,6 +267,10 @@ docstring InsetTOC::xhtml(XHTMLStream &, OutputParams const & op) const
<< title
<< html::EndTag("div");
// with lists of listings, at least, there is no depth
// to worry about. so the code can be simpler.
bool const use_depth = (command == "tableofcontents");
// Output of TOC
if (use_depth)
makeTOCWithDepth(xs, toc, op);