mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 19:19:19 +02:00
cocoa: move attaching of AppleMenu into cocoaWS class (as at windows class). Resolving glitches with an empty menu
git-svn-id: trunk@61468 -
This commit is contained in:
parent
81580355ac
commit
b61d8f9ba2
@ -680,6 +680,10 @@ begin
|
||||
PrevMenu.retain;
|
||||
|
||||
PrevLCLMenu := CurLCLMenu;
|
||||
|
||||
if (lNSMenu.isKindOfClass(TCocoaMenu)) then
|
||||
TCocoaMenu(lNSMenu).attachAppleMenu();
|
||||
|
||||
NSApp.setMainMenu(lNSMenu);
|
||||
CurLCLMenu := ALCLMenu;
|
||||
|
||||
|
@ -367,7 +367,6 @@ begin
|
||||
if NSObject(ACustForm.Menu.Handle).isKindOfClass_(TCocoaMenu) then
|
||||
begin
|
||||
CocoaWidgetSet.SetMainMenu(ACustForm.Menu.Handle, ACustForm.Menu);
|
||||
TCocoaMenu(ACustForm.Menu.Handle).attachAppleMenu();
|
||||
end
|
||||
else
|
||||
debugln('Warning: Menu does not have a valid handle.');
|
||||
|
Loading…
Reference in New Issue
Block a user