summaryrefslogtreecommitdiffstats
path: root/vcl/source/window/menu.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/window/menu.cxx')
-rw-r--r--vcl/source/window/menu.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx
index 82d630742a..a0a03be455 100644
--- a/vcl/source/window/menu.cxx
+++ b/vcl/source/window/menu.cxx
@@ -2863,9 +2863,12 @@ bool PopupMenu::PrepareRun(const VclPtr<vcl::Window>& pParentWin, tools::Rectang
if (bRealExecute)
nPopupModeFlags |= FloatWinPopupFlags::NewLevel;
+ // MenuFlags get clobbered in the Activate function. Restore them after calling.
+ MenuFlags nMenuFlagsSaved = GetMenuFlags();
bInCallback = true; // set it here, if Activate overridden
Activate();
bInCallback = false;
+ SetMenuFlags(nMenuFlagsSaved);
if (pParentWin->isDisposed())
return false;
@@ -2884,13 +2887,6 @@ bool PopupMenu::PrepareRun(const VclPtr<vcl::Window>& pParentWin, tools::Rectang
else
nMenuFlags &= ~MenuFlags::HideDisabledEntries;
}
- else
- {
- if (officecfg::Office::Common::View::Menu::DontHideDisabledEntry::get())
- nMenuFlags &= ~MenuFlags::HideDisabledEntries;
- else
- nMenuFlags |= MenuFlags::HideDisabledEntries;
- }
sal_uInt16 nVisibleEntries = ImplGetVisibleItemCount();
if ( !nVisibleEntries )