From 09c40d669cac5f167fa68cb5c6ad94a6a9e2a844 Mon Sep 17 00:00:00 2001 From: Attila Szűcs Date: Thu, 18 May 2023 10:36:38 +0200 Subject: LOK: Navigator: headings expanded by default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Called an expand_row for the first element of the contetnTree in the navigator constructor. Right now contructor is called every time when navigator is opened, it may change later. (desktop app do it only if navigator opens in a new window, not on sidebar) Change-Id: Ibe4b71e6a6ddb573269178f83c295b0c2cbd53b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151939 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos --- sw/source/uibase/utlui/navipi.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sw') diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx index 99f87a13a055..61ada3408bbc 100644 --- a/sw/source/uibase/utlui/navipi.cxx +++ b/sw/source/uibase/utlui/navipi.cxx @@ -692,6 +692,12 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent, m_xGlobalBox->hide(); m_xGlobalToolBox->hide(); m_xGlobalTree->HideTree(); + + //Open Headings by default + auto& pTreeView = m_xContentTree->get_widget(); + std::unique_ptr itEntry(pTreeView.make_iterator()); + pTreeView.get_iter_first(*itEntry); + pTreeView.expand_row(*itEntry); } } -- cgit