diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-01-22 19:51:13 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-01-22 19:51:13 (GMT) |
commit | c22d77a7a9c0f26a060a58047f514869a9e0a067 (patch) | |
tree | 082a1fab748f7d6917c9728b6f302bb4757de12d /src/ftvhelp.cpp | |
parent | fd8b446f8ae60e7d1dc259c6f5fe38c287377d19 (diff) | |
download | Doxygen-c22d77a7a9c0f26a060a58047f514869a9e0a067.zip Doxygen-c22d77a7a9c0f26a060a58047f514869a9e0a067.tar.gz Doxygen-c22d77a7a9c0f26a060a58047f514869a9e0a067.tar.bz2 |
Release-1.7.6.1-20120122
Diffstat (limited to 'src/ftvhelp.cpp')
-rw-r--r-- | src/ftvhelp.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/ftvhelp.cpp b/src/ftvhelp.cpp index 5d1061c..a8f9de3 100644 --- a/src/ftvhelp.cpp +++ b/src/ftvhelp.cpp @@ -31,6 +31,7 @@ #include "language.h" #include "htmlgen.h" #include "layout.h" +#include "pagedef.h" #define MAX_INDENT 1024 @@ -849,10 +850,17 @@ void FTVHelp::generateTreeViewScripts() QCString &projName = Config_getString("PROJECT_NAME"); if (projName.isEmpty()) { - LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::MainPage); - t << "\"" << convertToJSString(lne->title()) << "\", "; + if (Doxygen::mainPage && !Doxygen::mainPage->title().isEmpty()) // Use title of main page as root + { + t << "\"" << convertToJSString(Doxygen::mainPage->title()) << "\", "; + } + else // Use default section title as root + { + LayoutNavEntry *lne = LayoutDocManager::instance().rootNavEntry()->find(LayoutNavEntry::MainPage); + t << "\"" << convertToJSString(lne->title()) << "\", "; + } } - else + else // use PROJECT_NAME as root tree element { t << "\"" << convertToJSString(projName) << "\", "; } |