summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@pardus.org.tr>2017-01-12 11:17:11 +0300
committerMuhammet Kara <muhammet.kara@pardus.org.tr>2017-01-18 13:29:50 +0000
commit0c0f023142f3f85f6de384e43da6d620e5c6082a (patch)
tree9127e998f2c72e72d1ca69ac1cac4c8a39d8d84d /cui
parent4a17897ff3b8aeadaa0e7effc997ba43fb8e17e0 (diff)
tdf#105014: Disable related buttons when there is no menu to edit
Clicking the "Add Separator" or the "Add Submenu" button, when there is no menu edit, causes LibreOffice to crash. So disable them properly. Change-Id: Ibf685145a87c9e4343d83e1bb5ef6f08136c8f31 Reviewed-on: https://gerrit.libreoffice.org/32987 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de> (cherry picked from commit ce0f9962d1d1d5a4f6301be18c23b2d14efd9d6b) Reviewed-on: https://gerrit.libreoffice.org/33247 Reviewed-by: Muhammet Kara <muhammet.kara@pardus.org.tr> Tested-by: Muhammet Kara <muhammet.kara@pardus.org.tr>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index cf734f776336..93139cae0cf3 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -2546,7 +2546,6 @@ void SvxMenuConfigPage::UpdateButtonStates()
m_pMoveUpButton->Enable( false );
m_pMoveDownButton->Enable( false );
m_pDeleteCommandButton->Enable(false);
- m_pAddSeparatorButton->Enable();
pPopup->EnableItem( "modrename", false );
@@ -2655,6 +2654,7 @@ IMPL_LINK_NOARG( SvxMenuConfigPage, SelectMenu, ListBox&, void )
m_pModifyCommandButton->Enable( pMenuData != nullptr );
m_pAddCommandsButton->Enable( pMenuData != nullptr );
m_pAddSeparatorButton->Enable( pMenuData != nullptr );
+ m_pAddSubmenuButton->Enable( pMenuData != nullptr );
PopupMenu* pPopup = m_pModifyTopLevelButton->GetPopupMenu();
if ( pMenuData )