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

New commits:
commit f3d16ef054acd8c98559716e48b4cd84078c6a4c
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Sat Oct 30 14:34:55 2021 -0800
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Sun Oct 31 17:20:57 2021 +0100

    SwNavigator: Improve tracking on showing
    
    Currently, tracking is not updated when the List Box mode is switched
    from Off (content tree hidden) to On (content tree shown) and is not
    immediatly updated for the sidebar version on showing. This patch fixes
    these cases by making tracking update on show.
    
    Change-Id: Ic7c4ba2ddad70e469ecfed97c656fd83b59584d5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124499
    Tested-by: Jenkins
    Reviewed-by: Jim Raykowski <rayk...@gmail.com>

diff --git a/sw/source/uibase/utlui/navipi.cxx 
b/sw/source/uibase/utlui/navipi.cxx
index 1652aa2e81a7..36c697da9d37 100644
--- a/sw/source/uibase/utlui/navipi.cxx
+++ b/sw/source/uibase/utlui/navipi.cxx
@@ -150,6 +150,8 @@ void SwNavigationPI::FillBox()
         else
             m_xContentTree->Display( true );
         m_pActContView = pView;
+        if (m_pActContView)
+            m_xContentTree->UpdateTracking();
     }
 }
 
@@ -750,11 +752,8 @@ void SwNavigationPI::UpdateInitShow()
     // show content if docked
     if (!bParentIsFloatingWindow && IsZoomedIn())
         ZoomOut();
-    if (m_xContentTree)
-    {
-        m_xContentTree->SetActiveShell(GetActiveWrtShell());
-        m_xContentTree->UpdateTracking();
-    }
+    if (!IsZoomedIn())
+        FillBox();
 }
 
 IMPL_LINK_NOARG(SwNavigationPI, SetFocusChildHdl, weld::Container&, void)
@@ -1150,8 +1149,6 @@ SwNavigatorWin::SwNavigatorWin(SfxBindings* _pBindings, 
SfxChildWindow* _pMgr,
     SetMinOutputSizePixel(GetOptimalSize());
     if (pNaviConfig->IsSmall())
         m_xNavi->ZoomIn();
-
-    m_xNavi->m_xContentTree->UpdateTracking();
 }
 
 void SwNavigatorWin::StateChanged(StateChangedType nStateChange)

Reply via email to