sd/source/ui/dlg/navigatr.cxx | 5 +++++ sd/source/ui/view/drviews4.cxx | 9 +-------- 2 files changed, 6 insertions(+), 8 deletions(-)
New commits: commit 748561425774fa40ab685fed80d113f7e8301158 Author: Jim Raykowski <[email protected]> AuthorDate: Thu Mar 21 22:15:08 2024 -0800 Commit: Jim Raykowski <[email protected]> CommitDate: Sun Apr 7 19:22:05 2024 +0200 SdNavigator: speed up notifications to update the Navigator state Change-Id: I191cd83ffce3f1ded9c67abcdf319034972a0b16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165151 Tested-by: Jenkins Reviewed-by: Jim Raykowski <[email protected]> diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index af0e37e36d3a..893732f86662 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -460,6 +460,11 @@ IMPL_LINK_NOARG(SdNavigatorWin, ClickObjectHdl, weld::TreeView&, bool) pDrawView->MarkObj(pCursorEntryObject, pDrawView->GetSdrPageView(), true); } + // SID_NAVIGATOR_STATE invalidate is done in DrawViewShell::ExecNavigatorWin + // and DrawDocShell::GotoBookmark. Update the bindings here to speed up Navigator + // state update. + mpBindings->Update(); + // moved here from SetGetFocusHdl. Reset the // focus only if something has been selected in the // document. diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 12a734a6ca45..8c547d8525fc 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -306,16 +306,9 @@ void DrawViewShell::FreshNavigatrTree() SfxViewFrame *pViewFrame = GetViewFrame(); if (!pViewFrame) return; - SfxChildWindow* pWindow = pViewFrame->GetChildWindow( SID_NAVIGATOR ); - if( pWindow ) - { - SdNavigatorFloat* pNavWin = static_cast<SdNavigatorFloat*>( pWindow->GetWindow() ); - if( pNavWin ) - pNavWin->FreshTree( GetDoc() ); - } - // sidebar version SfxBindings& rBindings = pViewFrame->GetBindings(); rBindings.Invalidate(SID_NAVIGATOR_STATE, true); + rBindings.Update(); } void DrawViewShell::MouseButtonDown(const MouseEvent& rMEvt,
