sd/source/ui/dlg/navigatr.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 3be164e0c7dc2cc73e32e643e30357e126238588
Author: Jim Raykowski <[email protected]>
AuthorDate: Mon Apr 1 23:08:40 2024 -0800
Commit: Jim Raykowski <[email protected]>
CommitDate: Thu Apr 4 10:04:25 2024 +0200
SdNavigator: Show context menu only for active document navigation
Change-Id: I3d622f92d411b30e5beea5432e10ae0a907eeb0d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165667
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 a329601a2a35..cdbfcac41382 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -285,6 +285,8 @@ IMPL_STATIC_LINK_NOARG(SdNavigatorWin, MouseReleaseHdl,
const MouseEvent&, bool)
IMPL_LINK(SdNavigatorWin, CommandHdl, const CommandEvent&, rCEvt, bool)
{
+ if (NavDocInfo* pInfo = GetDocInfo(); !pInfo || !pInfo->IsActive())
+ return false;
if (rCEvt.GetCommand() != CommandEventId::ContextMenu)
return false;
weld::TreeView& rTreeView = GetObjects().get_treeview();