doxypress icon indicating copy to clipboard operation
doxypress copied to clipboard

navtree sync issue

Open Sp3EdeR opened this issue 6 years ago • 5 comments
trafficstars

Pre-conditions:

  • specifying a \mainpage, which is then inserted under the navtree root
  • set a "low" \sortid, causing the main page to be organized before other pages in the same level of the navtree

Issue:

  • The auto-synced navtree opening is broken; it opens the one-earlier tree category rather than the one we're at.

Expected:

  • The navtree synchronization opens the correct nodes of the tree corresponding to the page opened.

Analysis:

  • The breadcrumb indexes generated into navtreeindex0.js do not account for the main page's location in their first numeric value. With hand-fixed breadcrumbs, the feature seems to work.

Sp3EdeR avatar Sep 27 '19 08:09 Sp3EdeR

Thanks for the report and all the details. We will look into this next week.

bgeller avatar Sep 27 '19 17:09 bgeller

Thanks for the report and all the details. We will look into this next week.

Hello @bgeller, Did you have any time to look into this issue yet?

Sp3EdeR avatar Oct 07 '19 10:10 Sp3EdeR

Sorry for the delay, so many things to sort out from our time at CppCon 2019. This is definitely on our road map and will be addressed. Thanks for your patience.

bgeller avatar Oct 07 '19 22:10 bgeller

It seems to me that replacing the following code in ftvhelp.cpp / reSortNodes has no side effect and fixes the issue:

if (node->file == "index") {
    // do not count this page
} else {
    counter++;
}

with just counter++;.

I've tested two cases:

  • When creating a main page, the main page is count in the list and the breadcrumb index is fixed from this change.
  • When not creating a main page, it is not part of the listing in any of the runs into this function, so there was no problematic behavior.

Unfortunately I'm unable to create a proper build and test environment from the source code. I was only able to test it on a VERY just-barely-hacked-together build...

Sp3EdeR avatar Oct 14 '19 14:10 Sp3EdeR

This is some good debugging, however this is a touchy section of code. We need to do a bit more thorough testing before accepting this patch to ensure all the corner cases are still handled correctly.

agserm avatar Oct 15 '19 03:10 agserm