mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 12:40:33 +02:00
carbon: fix remove menu error messages on IDE start
git-svn-id: trunk@21492 -
This commit is contained in:
parent
7799ac78c6
commit
6bd45cf1f1
@ -48,7 +48,7 @@ type
|
||||
FParentMenu: TCarbonMenu;
|
||||
FRoot: Boolean;
|
||||
FItems: TObjectList; // of TCarbonMenu
|
||||
procedure MenuNeeded;
|
||||
procedure MenuNeeded(UpdateWithParent: Boolean=True);
|
||||
function GetIndex: Integer;
|
||||
protected
|
||||
procedure RegisterEvents;
|
||||
@ -152,7 +152,7 @@ end;
|
||||
|
||||
Creates Carbon menu object for sub menu
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCarbonMenu.MenuNeeded;
|
||||
procedure TCarbonMenu.MenuNeeded(UpdateWithParent: Boolean);
|
||||
begin
|
||||
if Menu <> nil then Exit;
|
||||
|
||||
@ -165,7 +165,7 @@ begin
|
||||
|
||||
RegisterEvents;
|
||||
|
||||
if FParentMenu <> nil then
|
||||
if (FParentMenu <> nil) and UpdateWithParent then
|
||||
begin
|
||||
SetCaption(LCLMenuItem.Caption);
|
||||
|
||||
@ -376,8 +376,8 @@ begin
|
||||
{$ENDIF}
|
||||
|
||||
Index := GetIndex;
|
||||
if FParentMenu.FRoot then MenuNeeded; // menu item is in toplevel of root menu
|
||||
|
||||
if FParentMenu.FRoot then MenuNeeded(False); // menu item is in toplevel of root menu.
|
||||
|
||||
if LCLMenuItem.Caption = cLineCaption then // menu item is separator
|
||||
OSError(
|
||||
InsertMenuItemTextWithCFString(FParentMenu.Menu, nil, Index,
|
||||
|
Loading…
Reference in New Issue
Block a user