diff --git a/src/docsets.h b/src/docsets.h index 03146f1a259..55643a3ed70 100644 --- a/src/docsets.h +++ b/src/docsets.h @@ -48,6 +48,7 @@ class DocSets : public IndexIntf bool addToNavIndex, const Definition *def ); + void closeContentsItem() {} void addIndexItem(const Definition *context,const MemberDef *md, const QCString §ionAnchor,const QCString &title); void addIndexFile(const QCString &name); diff --git a/src/eclipsehelp.h b/src/eclipsehelp.h index 1ba4df44fb2..0f6a69a36e6 100644 --- a/src/eclipsehelp.h +++ b/src/eclipsehelp.h @@ -51,6 +51,7 @@ class EclipseHelp : public IndexIntf virtual void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor,bool separateIndex,bool addToNavIndex, const Definition *def); + virtual void closeContentsItem() {} virtual void addIndexItem(const Definition *context,const MemberDef *md, const QCString §ionAnchor,const QCString &title); virtual void addIndexFile(const QCString &name); diff --git a/src/ftvhelp.h b/src/ftvhelp.h index 196b01cfdfd..2eda272fc8e 100644 --- a/src/ftvhelp.h +++ b/src/ftvhelp.h @@ -50,6 +50,7 @@ class FTVHelp : public IndexIntf bool separateIndex, bool addToNavIndex, const Definition *def); + void closeContentsItem() {} void addIndexItem(const Definition *,const MemberDef *,const QCString &,const QCString &) {} void addIndexFile(const QCString &) {} void addImageFile(const QCString &) {} diff --git a/src/htmlhelp.h b/src/htmlhelp.h index 9d8eea5ed60..99f975e9385 100644 --- a/src/htmlhelp.h +++ b/src/htmlhelp.h @@ -73,6 +73,7 @@ class HtmlHelp : public IndexIntf bool separateIndex, bool addToNavIndex, const Definition *def); + void closeContentsItem() {} void addIndexItem(const Definition *context,const MemberDef *md, const QCString §ionAnchor, const QCString &title); void addIndexFile(const QCString &name); diff --git a/src/index.cpp b/src/index.cpp index 6c4a69da78a..f002e83dfac 100644 --- a/src/index.cpp +++ b/src/index.cpp @@ -3834,6 +3834,10 @@ static void writeGroupTreeNode(OutputList &ol, const GroupDef *gd, int level, FT } Doxygen::indexList->decContentsDepth(); } + if (md->isVisible() && !md->isAnonymous()) + { + Doxygen::indexList->closeContentsItem(); + } } } } diff --git a/src/index.h b/src/index.h index 1244e6d3a3a..2d4be9c6ebf 100644 --- a/src/index.h +++ b/src/index.h @@ -40,6 +40,7 @@ class IndexIntf virtual void addContentsItem(bool isDir, const QCString &name, const QCString &ref, const QCString &file, const QCString &anchor, bool separateIndex, bool addToNavIndex,const Definition *def) = 0; + virtual void closeContentsItem() = 0; virtual void addIndexItem(const Definition *context,const MemberDef *md, const QCString §ionAnchor,const QCString &title) = 0; virtual void addIndexFile(const QCString &name) = 0; @@ -98,6 +99,8 @@ class IndexList : public IndexIntf const QCString &file, const QCString &anchor,bool separateIndex=FALSE,bool addToNavIndex=FALSE, const Definition *def=0) { if (m_enabled) foreach(&IndexIntf::addContentsItem,isDir,name,ref,file,anchor,separateIndex,addToNavIndex,def); } + void closeContentsItem() + { if (m_enabled) foreach(&IndexIntf::closeContentsItem); } void addIndexItem(const Definition *context,const MemberDef *md,const QCString §ionAnchor=QCString(),const QCString &title=QCString()) { if (m_enabled) foreach(&IndexIntf::addIndexItem,context,md,sectionAnchor,title); } void addIndexFile(const QCString &name) diff --git a/src/markdown.cpp b/src/markdown.cpp index 87176c33504..8f350360a4d 100644 --- a/src/markdown.cpp +++ b/src/markdown.cpp @@ -3540,7 +3540,9 @@ void MarkdownOutlineParser::parseInput(const QCString &fileName, docs = docs.left(labelStartPos)+ // part before label newLabel+ // new label docs.mid(labelEndPos,lineLen-labelEndPos-1)+ // part between orgLabel and \n - "\\ilinebr @anchor "+orgLabel+"\n"+ // add original anchor + "\\ilinebr @ianchor "+orgLabel+ // add original anchor + docs.mid(labelEndPos,lineLen-labelEndPos-1)+ // part between orgLabel and \n + "\n"+ docs.right(docs.length()-match.length()); // add remainder of docs } } diff --git a/src/qhp.cpp b/src/qhp.cpp index e25b6d08bf3..06edabe16f3 100644 --- a/src/qhp.cpp +++ b/src/qhp.cpp @@ -193,6 +193,12 @@ void Qhp::decContentsDepth() m_sectionLevel--; } +void Qhp::closeContentsItem() +{ + handlePrevSection(); + m_toc.close("section"); + m_openCount--; +} void Qhp::addContentsItem(bool /*isDir*/, const QCString & name, const QCString & /*ref*/, const QCString & file, const QCString &anchor, bool /* separateIndex */, @@ -205,7 +211,7 @@ void Qhp::addContentsItem(bool /*isDir*/, const QCString & name, QCString f = file; if (!f.isEmpty() && f.at(0)=='^') return; // absolute URL not supported - int diff = m_prevSectionLevel - m_sectionLevel; + int diff = m_prevSectionLevel - m_sectionLevel - 1; handlePrevSection(); setPrevSection(name, f, anchor, m_sectionLevel); @@ -310,13 +316,8 @@ void Qhp::handlePrevSection() */ - if (m_prevSectionTitle.isNull()) - { - m_prevSectionTitle=" "; // should not happen... - } - // We skip "Main Page" as our extra root is pointing to that - if (!((m_prevSectionLevel==1) && (m_prevSectionTitle==getFullProjectName()))) + if (!((m_prevSectionLevel==1) && (m_prevSectionTitle==getFullProjectName())) && !m_prevSectionTitle.isNull()) { QCString finalRef = makeRef(m_prevSectionBaseName, m_prevSectionAnchor); diff --git a/src/qhp.h b/src/qhp.h index c35b632905e..d1ac0151d40 100644 --- a/src/qhp.h +++ b/src/qhp.h @@ -37,6 +37,7 @@ class Qhp : public IndexIntf const Definition *def); void addIndexItem(const Definition *context, const MemberDef *md, const QCString §ionAnchor, const QCString &title); + void closeContentsItem(); void addIndexFile(const QCString & name); void addImageFile(const QCString & name); void addStyleSheetFile(const QCString & name); diff --git a/templates/general/layout_default.xml b/templates/general/layout_default.xml index bebeda97b4c..dba7145a5ac 100644 --- a/templates/general/layout_default.xml +++ b/templates/general/layout_default.xml @@ -13,29 +13,29 @@ - + - + - + - + - +