mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 20:29:12 +02:00
Cocoa/ToolBar: fine-tuning
This commit is contained in:
parent
b83d086ebd
commit
b5a01af355
@ -450,7 +450,7 @@ var
|
||||
begin
|
||||
index:= _itemGroup.selectedIndex;
|
||||
self.lclSetSelectedIndex( index );
|
||||
_handler( self.lclGetSelectedItem );
|
||||
_handler( _itemGroup );
|
||||
end;
|
||||
|
||||
function TCocoaToolBarItemGroupWrapper.lclGetSelectedItem: NSToolBarItem;
|
||||
@ -732,8 +732,10 @@ begin
|
||||
if NOT Assigned(_onAction) then
|
||||
cocoaItem.setAction( nil );
|
||||
|
||||
cocoaMenu:= NSMenuItem(_menu.Handle).submenu;
|
||||
cocoaItem.setMenu( cocoaMenu );
|
||||
if Assigned(_menu) then begin
|
||||
cocoaMenu:= NSMenuItem(_menu.Handle).submenu;
|
||||
cocoaItem.setMenu( cocoaMenu );
|
||||
end;
|
||||
|
||||
cocoaItem.autorelease;
|
||||
Result:= cocoaItem;
|
||||
|
Loading…
Reference in New Issue
Block a user