sw/source/uibase/utlui/content.cxx |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit be0f8c193316087495fd2501b3228207d4095bb5
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Sat May 21 20:33:36 2022 -0800
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Sun May 22 23:57:56 2022 +0200

    tdf#144788 follow up: fix SwNavigator footnote tracking
    
    Changes incorrect handling for both footnote and endnote tracking
    when either a footnote or an endnote attribute is at the current
    cursor position to handling for only footnote or endnote.
    
    Change-Id: Ib65704ae48298c02cfe557d62d1c002a1859321f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134717
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 89f9f627e7cc..deb11ce9160f 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3709,10 +3709,13 @@ void SwContentTree::UpdateTracking()
                 && (m_nRootType != ContentTypeId::FOOTNOTE
                     && m_nRootType != ContentTypeId::ENDNOTE)))
         {
-            if (mTrackContentType[ContentTypeId::FOOTNOTE])
-                lcl_SelectByContentTypeAndAddress(this, *m_xTreeView, 
ContentTypeId::FOOTNOTE,
-                                                  aContentAtPos.pFndTextAttr);
-            if (mTrackContentType[ContentTypeId::ENDNOTE])
+            if (!aContentAtPos.pFndTextAttr->GetFootnote().IsEndNote())
+            {
+                if (mTrackContentType[ContentTypeId::FOOTNOTE])
+                    lcl_SelectByContentTypeAndAddress(this, *m_xTreeView, 
ContentTypeId::FOOTNOTE,
+                                                      
aContentAtPos.pFndTextAttr);
+            }
+            else if (mTrackContentType[ContentTypeId::ENDNOTE])
                 lcl_SelectByContentTypeAndAddress(this, *m_xTreeView, 
ContentTypeId::ENDNOTE,
                                                   aContentAtPos.pFndTextAttr);
             return;

Reply via email to