Skip to content

Commit

Permalink
Bug 742445 - Wrong icons in TOC of CHM help
Browse files Browse the repository at this point in the history
It was not checked if a page / section had subsections or not it was always assumed they were present (definition.cpp). For pages it was only checked if it had subpages and not section (index.cpp).
  • Loading branch information
albert-github committed Jan 6, 2015
1 parent ab33e93 commit 8c97e0c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/definition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,11 @@ void Definition::addSectionsToIndex()
}
QCString title = si->title;
if (title.isEmpty()) title = si->label;
Doxygen::indexList->addContentsItem(TRUE,title,
// determine if there is a next level inside this item
++li;
bool isDir = ((li.current()) ? (int)(li.current()->type > nextLevel):FALSE);
--li;
Doxygen::indexList->addContentsItem(isDir,title,
getReference(),
getOutputFileBase(),
si->label,
Expand Down
4 changes: 2 additions & 2 deletions src/index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3116,14 +3116,14 @@ static void writePages(PageDef *pd,FTVHelp *ftv)
{
//printf("*** adding %s\n",pageTitle.data());
ftv->addContentsItem(
hasSubPages,pageTitle,
hasSubPages || hasSections,pageTitle,
pd->getReference(),pd->getOutputFileBase(),
0,hasSubPages,TRUE,pd);
}
if (addToIndex && pd!=Doxygen::mainPage)
{
Doxygen::indexList->addContentsItem(
hasSubPages,pageTitle,
hasSubPages || hasSections,pageTitle,
pd->getReference(),pd->getOutputFileBase(),
0,hasSubPages,TRUE);
}
Expand Down

0 comments on commit 8c97e0c

Please sign in to comment.