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

New commits:
commit a7fdd0a78bc613fd3e376880b77a2c82edbccefe
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Mon Oct 21 02:29:43 2019 -0800
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Sat Oct 26 12:39:15 2019 +0200

    tdf#128285 Only update Navigator heading tracking if document has focus
    
    Change-Id: I8e4d9a7b80bdae32d83349db20058f2be62e02c1
    Reviewed-on: https://gerrit.libreoffice.org/81539
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/sw/source/uibase/utlui/content.cxx 
b/sw/source/uibase/utlui/content.cxx
index 8d9ceaafa523..183553d266f9 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -2121,7 +2121,7 @@ bool SwContentTree::HasContentChanged()
             else
             {
                 SvTreeListEntry* pFirstSel;
-                if(bOutline &&
+                if(bOutline && !HasFocus() &&
                         nullptr != ( pFirstSel = FirstSelected()) &&
                             lcl_IsContent(pFirstSel))
                 {
@@ -2745,12 +2745,14 @@ IMPL_LINK_NOARG(SwContentTree, TimerUpdate, Timer *, 
void)
     if (IsDisposed())
         return;
 
+    // No update while focus is not in document.
     // No update while drag and drop.
     // Query view because the Navigator is cleared too late.
     SwView* pView = GetParentWindow()->GetCreateView();
-    if( (!HasFocus() || m_bViewHasChanged) &&
-         !bIsInDrag && !m_bIsInternalDrag && pView &&
-         pView->GetWrtShellPtr() && !pView->GetWrtShellPtr()->ActionPend() )
+
+    if(pView && pView->GetWrtShellPtr() &&
+            ((pView->GetWrtShellPtr()->GetWin() == GetFocusedWindow()) || 
m_bViewHasChanged) &&
+            !bIsInDrag && !m_bIsInternalDrag && 
!pView->GetWrtShellPtr()->ActionPend())
     {
         m_bViewHasChanged = false;
         m_bIsIdleClear = false;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to