Cocoa/ToolBar: fix the setting order for NSMenuToolBarItem

This commit is contained in:
rich2014 2024-09-12 23:45:45 +08:00
parent be1b06eadc
commit 45e46500f8

View File

@ -724,10 +724,10 @@ var
cocoaMenu: NSMenu;
begin
cocoaItem:= TCocoaToolBarItemMenu.alloc.initWithItemIdentifier( self.identifier );
cocoaItem.setShowsIndicator( _showsIndicator );
self.setItemAttribs( cocoaItem );
if NOT Assigned(_onAction) then
cocoaItem.setAction( nil );
cocoaItem.setShowsIndicator( _showsIndicator );
if NOT Assigned(_menu) then begin
if Assigned(_onGetMenu) then