diff options
Diffstat (limited to 'vcl/source/helper/commandinfoprovider.cxx')
-rw-r--r-- | vcl/source/helper/commandinfoprovider.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/vcl/source/helper/commandinfoprovider.cxx b/vcl/source/helper/commandinfoprovider.cxx index c878a94323bc..77d5ba6903de 100644 --- a/vcl/source/helper/commandinfoprovider.cxx +++ b/vcl/source/helper/commandinfoprovider.cxx @@ -166,7 +166,10 @@ OUString CommandInfoProvider::GetTooltipForCommand ( if (sLabel.isEmpty()) sLabel = GetCommandProperty("Name", rsCommandName); - const OUString sShortCut(GetCommandShortcut(rsCommandName, rxFrame)); + // Command can be just an alias to another command, + // so need to get the shortcut of the "real" command. + const OUString sRealCommand(GetRealCommandForCommand(rsCommandName, rxFrame)); + const OUString sShortCut(GetCommandShortcut(!sRealCommand.isEmpty() ? sRealCommand : rsCommandName, rxFrame)); if (!sShortCut.isEmpty()) return sLabel + " (" + sShortCut + ")"; return sLabel; |