sw/source/uibase/utlui/navipi.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 09c40d669cac5f167fa68cb5c6ad94a6a9e2a844
Author:     Attila Szűcs <attila.sz...@collabora.com>
AuthorDate: Thu May 18 10:36:38 2023 +0200
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Mon May 22 15:26:34 2023 +0200

    LOK: Navigator: headings expanded by default
    
    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 <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Szymon Kłos <szymon.k...@collabora.com>

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<weld::TreeIter> itEntry(pTreeView.make_iterator());
+        pTreeView.get_iter_first(*itEntry);
+        pTreeView.expand_row(*itEntry);
     }
 }
 

Reply via email to