sw/source/uibase/utlui/content.cxx | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
New commits: commit 1fca94be7fafc305cf02c0134fbc2d7e5cfb2a03 Author: Pranam Lashkari <lpra...@collabora.com> AuthorDate: Tue Aug 29 17:37:38 2023 +0800 Commit: Pranam Lashkari <lpra...@collabora.com> CommitDate: Wed Aug 30 12:54:05 2023 +0200 LOK: update navigator instantly on heading level change problem: i.e: when you change the header level, it was not reflected instantly in navigator and required reopening it. That was due to header level change was not registed as change in LOK case Change-Id: I503eb6a3fe9d2801ea5b45b0a1096e8174360ddc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156239 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Attila Szűcs <attila.sz...@collabora.com> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index c837124b723c..03d46e4a8cc2 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -2991,18 +2991,24 @@ bool SwContentTree::HasContentChanged() // In case of LOK, empty contentTypes are hidden, even in all content view // so it is not enough to check only the m_xTreeView. bool bCountChanged = false; + bool bHasContentChanged = false; for (ContentTypeId i : o3tl::enumrange<ContentTypeId>()) { if (m_aActiveContentArr[i]) { auto nLastTMCount = m_aActiveContentArr[i]->GetMemberCount(); - m_aActiveContentArr[i]->FillMemberList(); + if (i == ContentTypeId::OUTLINE) // this is required for checking if header level is changed + m_aActiveContentArr[i]->FillMemberList(&bHasContentChanged); + else + m_aActiveContentArr[i]->FillMemberList(); // If the member count of a type is changed, then the content is surely changed if (m_aActiveContentArr[i]->GetMemberCount() != nLastTMCount) bCountChanged = true; + if (bHasContentChanged) + bContentChanged = true; } } - if (bCountChanged) + if (bCountChanged || bContentChanged) return true; }