diff options
author | Rafael Lima <rafael.palma.lima@gmail.com> | 2023-07-24 23:05:50 +0200 |
---|---|---|
committer | Rafael Lima <rafael.palma.lima@gmail.com> | 2023-07-26 13:25:10 +0200 |
commit | 6fa4e5965b2a79ae6735f4191a2261713a42356e (patch) | |
tree | 225f6909bf441c1b28eae49fdd7840663774e0f1 /framework | |
parent | 7dc697addd0895b8aee0c051c0d4d4125414f012 (diff) |
tdf#149318 Set HID for menus that have sub menus
This patch fixes the following issue when pressing F1 while hovering on a menu entry that has submenus:
1) Place the mouse over a menu entry that has submenus (f.i. in Draw go to Format - Table)
2) A submenu will appear, however leave the mouse over "Table"
3) Press F1... the help ID used will be "slot:0" because LO is trying to find the help ID of the selected entry in the submenu, but since none is selected, then the generic "slot:0" value is used.
To fix this problem, this patch assigns a Help ID for the submenu (not for its entries) so that when no entry is focused, then the submenu HID is used.
IMPORTANT: note that pressing F1 on menus only work with gen and win. Due to bug 156376 pressing F1 on menus does not work with kf5 and gtk3 (yet).
Change-Id: I717e7669faac47a12c929129c0de98dee7f44439
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154862
Tested-by: Jenkins
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/uielement/menubarmanager.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index edbd88d2250c..b445324d70d5 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -1342,6 +1342,8 @@ void MenuBarManager::FillMenu( { VclPtr<PopupMenu> pNewPopupMenu = VclPtr<PopupMenu>::Create(); pMenu->SetPopupMenu( nId, pNewPopupMenu ); + // Use the command URL as the Help ID for the sub menu + pNewPopupMenu->SetHelpId(aCommandURL); if ( xDispatchProvider.is() ) { |