mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 09:49:19 +02:00
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:
parent
18296584ed
commit
7f172ef2ae
@ -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;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user