summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui/navipi.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/utlui/navipi.cxx')
-rw-r--r--sw/source/uibase/utlui/navipi.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/sw/source/uibase/utlui/navipi.cxx b/sw/source/uibase/utlui/navipi.cxx
index c868592e904d..3fd5b7f9b682 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -736,12 +736,11 @@ SwNavigationPI::SwNavigationPI(weld::Widget* pParent,
m_xGlobalTree->HideTree();
//Open Headings by default
- if (m_xContentTree->HasHeadings())
+ SwView *pView = GetCreateView();
+ if (pView->m_nNaviExpandedStatus < 0)
{
- auto& pTreeView = m_xContentTree->get_widget();
- std::unique_ptr<weld::TreeIter> itEntry(pTreeView.make_iterator());
- pTreeView.get_iter_first(*itEntry);
- pTreeView.expand_row(*itEntry);
+ pView->m_nNaviExpandedStatus = 1;
+ m_xContentTree->ExpandAllHeadings();
}
}
}