Carbon: Don't show the first part of a sequential combo shortcut in MenuItem. Issue #31613, patch from AlexeyT.

git-svn-id: trunk@54739 -
This commit is contained in:
juha 2017-04-26 10:05:24 +00:00
parent 18296584ed
commit 7f172ef2ae

View File

@ -198,8 +198,12 @@ class procedure TCarbonWSMenuItem.SetShortCut(const AMenuItem: TMenuItem;
begin
if not CheckMenuItem(AMenuItem, 'SetShortCut') then Exit;
if not CheckMenuItem(AMenuItem.Parent, 'SetShortCut', 'Parent') then Exit;
TCarbonMenu(AMenuItem.Handle).SetShortCut(ShortCutK1);
// Cannot set 2 shortcuts for menuitem, clear all if two
if ShortCutK2 <> 0{scNone} then
TCarbonMenu(AMenuItem.Handle).SetShortCut(0)
else
TCarbonMenu(AMenuItem.Handle).SetShortCut(ShortCutK1);
end;
{------------------------------------------------------------------------------