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 <raykowj@gmail.com>
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index af0e37e..893732f 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 12a734a..8c547d8 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,