diff options
author | Jim Raykowski <raykowj@gmail.com> | 2019-10-21 02:29:43 -0800 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-26 12:39:15 +0200 |
commit | a7fdd0a78bc613fd3e376880b77a2c82edbccefe (patch) | |
tree | 62f04eef6320ca61a8c16a50998f618d766c404c | |
parent | e276c812648bf511d6c4813d6fd82a00391cfdac (diff) |
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.grandin@collabora.co.uk>
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 10 |
1 files changed, 6 insertions, 4 deletions
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; |