sw/source/uibase/utlui/content.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
New commits: commit b8f067dae3424c9cc2373e84c8a3465d477f9adc Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Mon Dec 13 21:41:47 2021 -0900 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Mon Dec 20 16:22:05 2021 +0100 SwNavigator: fill content member lists when toggling from root view Other content type member data could have changed while in root content view. Fill the content member lists when toggling from root, excluding the toggled from root content which should already have the most recent data. Change-Id: I7a014affa72c05f0a89df29acfbabcaf59fe711a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126796 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> (cherry picked from commit dc54785f153a7fe8fecc1e21b0ef7c6549e2d0d0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126971 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 93b2af042fe7..a18e74c391ef 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2772,9 +2772,20 @@ void SwContentTree::ToggleToRoot() else { m_xTreeView->set_selection_mode(SelectionMode::Single); + m_nLastSelType = m_nRootType; m_nRootType = ContentTypeId::UNKNOWN; m_bIsRoot = false; - FindActiveTypeAndRemoveUserData(); + // Other content type member data could have changed while in root view. Fill the content + // member lists excluding the toggled from root content which should already have the most + // recent data. + if (State::HIDDEN != m_eState) + { + for (ContentTypeId i : o3tl::enumrange<ContentTypeId>()) + { + if (i != m_nLastSelType) + m_aActiveContentArr[i]->FillMemberList(); + } + } Display(State::HIDDEN != m_eState); } m_pConfig->SetRootType( m_nRootType );