summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2015-12-06 23:51:56 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2015-12-07 00:47:26 +0200
commit2cd9ecd8644d16780443cdb6b52e208af9066105 (patch)
treeecde3df44b9dd8d26ede2787d7b3807570ca36d8 /cui
parent8ca76fc12e088a95247cb8e47ba8252db59e7ea6 (diff)
SvxMenuConfigPage: Disable controls when no menus found
We reuse this page for context menus, but not all modules have context menus. This is the same behavior now as in the toolbars page (but ideally we shouldn't show those pages at all in such case). Change-Id: I66e308400d50934044179f07709c371578db8c39
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index c7d4a0194006..4d50289d8576 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2635,6 +2635,9 @@ IMPL_LINK_NOARG_TYPED( SvxMenuConfigPage, SelectMenu, ListBox&, void )
m_pContentsListBox->Clear();
SvxConfigEntry* pMenuData = GetTopLevelSelection();
+ m_pModifyTopLevelButton->Enable( pMenuData != nullptr );
+ m_pModifyCommandButton->Enable( pMenuData != nullptr );
+ m_pAddCommandsButton->Enable( pMenuData != nullptr );
PopupMenu* pPopup = m_pModifyTopLevelButton->GetPopupMenu();
if ( pMenuData )