From 201c9d7c775da90763f562e0ed3d414a7d3eaf9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?kleines=20Filmr=C3=B6llchen?= Date: Wed, 14 Dec 2022 17:53:41 +0100 Subject: 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. --- Userland/Applications/Help/ManualModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Applications/Help/ManualModel.cpp') 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 ManualModel::page_path(const GUI::ModelIndex& index) const if (!index.is_valid()) return {}; auto* node = static_cast(index.internal_data()); - if (!node->is_page()) + auto page = node->document(); + if (!page) return {}; - auto* page = static_cast(node); auto path = page->path(); if (path.is_error()) return {}; -- cgit v1.2.3