summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2021-12-13 21:41:47 -0900
committerXisco Fauli <xiscofauli@libreoffice.org>2021-12-20 16:22:05 +0100
commitb8f067dae3424c9cc2373e84c8a3465d477f9adc (patch)
treee2f6d71ecd24f39c0a812fe35eed8395427dca27
parentafd8e27195bef78df3eb2d3ecab9cc3dae695b64 (diff)
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 <raykowj@gmail.com> (cherry picked from commit dc54785f153a7fe8fecc1e21b0ef7c6549e2d0d0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126971 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--sw/source/uibase/utlui/content.cxx13
1 files changed, 12 insertions, 1 deletions
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 );