mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-22 11:02:53 +00:00
Help+LibManual: Open sibling page for subsections
Clicking on a subsection now displays the sibling page, which is intended to be the main page for that section.
This commit is contained in:
parent
3e67f14e58
commit
201c9d7c77
Notes:
sideshowbarker
2024-07-17 02:19:00 +09:00
Author: https://github.com/kleinesfilmroellchen
Commit: 201c9d7c77
Pull-request: https://github.com/SerenityOS/serenity/pull/16495
Reviewed-by: https://github.com/ADKaster ✅
6 changed files with 26 additions and 2 deletions
|
@ -58,9 +58,9 @@ Optional<String> ManualModel::page_path(const GUI::ModelIndex& index) const
|
|||
if (!index.is_valid())
|
||||
return {};
|
||||
auto* node = static_cast<Manual::Node const*>(index.internal_data());
|
||||
if (!node->is_page())
|
||||
auto page = node->document();
|
||||
if (!page)
|
||||
return {};
|
||||
auto* page = static_cast<Manual::PageNode const*>(node);
|
||||
auto path = page->path();
|
||||
if (path.is_error())
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue