diff options
author | kleines Filmröllchen <filmroellchen@serenityos.org> | 2022-12-14 17:53:41 +0100 |
---|---|---|
committer | Andrew Kaster <andrewdkaster@gmail.com> | 2023-01-02 06:15:13 -0700 |
commit | 201c9d7c775da90763f562e0ed3d414a7d3eaf9e (patch) | |
tree | 1a9e81fa698471036bdbfb4d48fd05a2637b4f25 /Userland/Applications/Help/ManualModel.cpp | |
parent | 3e67f14e584f9c700d8ee04b757286edf80b0c56 (diff) | |
download | serenity-201c9d7c775da90763f562e0ed3d414a7d3eaf9e.zip |
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.
Diffstat (limited to 'Userland/Applications/Help/ManualModel.cpp')
-rw-r--r-- | Userland/Applications/Help/ManualModel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Help/ManualModel.cpp b/Userland/Applications/Help/ManualModel.cpp index 7809a0dd12..9f22293539 100644 --- a/Userland/Applications/Help/ManualModel.cpp +++ b/Userland/Applications/Help/ManualModel.cpp @@ -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 {}; |