MG: broke menus.pp <-> controls.pp circle

git-svn-id: trunk@3548 -
This commit is contained in:
lazarus 2002-10-24 09:37:39 +00:00
parent 54dc2291c2
commit dbe9e4a855
3 changed files with 34 additions and 4 deletions

View File

@ -142,6 +142,30 @@ Procedure TCustomForm.Notification(AComponent : TComponent;
Operation : TOperation);
Begin
inherited Notification(AComponent,Operation);
case Operation of
opInsert:
begin
{if AComponent is TCustomActionList then
begin
if FActionLists = nil then FActionLists := TList.Create;
FActionLists.Add(AComponent);
end
else }if not (csLoading in ComponentState) and (Menu = nil) and
(AComponent.Owner = Self) and (AComponent is TMainMenu) then
Menu := TMainMenu(AComponent);
end;
opRemove:
begin
{if (FActionLists <> nil) and (AComponent is TCustomActionList) then
FActionLists.Remove(AComponent)
else
begin}
if Menu = AComponent then Menu := nil;
//if WindowMenu = AComponent then WindowMenu := nil;
//if ObjectMenuItem = AComponent then ObjectMenuItem := nil;
//end;
end;
end;
if FDesigner <> nil then FDesigner.Notification(AComponent,Operation);
End;
@ -1143,6 +1167,9 @@ end;
{ =============================================================================
$Log$
Revision 1.65 2002/10/24 09:37:39 lazarus
MG: broke menus.pp <-> controls.pp circle
Revision 1.64 2002/10/23 20:47:26 lazarus
AJ: Started Form Scrolling
Started StaticText FocusControl

View File

@ -81,9 +81,6 @@ end;
------------------------------------------------------------------------------}
destructor TMenu.Destroy;
begin
if (Parent<>nil) and (Parent is TCustomForm)
and (TCustomForm(Parent).Menu=Self) then
TCustomForm(Parent).Menu:=nil;
FItems.Free;
inherited Destroy;
end;
@ -173,6 +170,9 @@ end;
{ =============================================================================
$Log$
Revision 1.14 2002/10/24 09:37:39 lazarus
MG: broke menus.pp <-> controls.pp circle
Revision 1.13 2002/09/19 16:45:54 lazarus
MG: fixed Menu.Free and gdkwindow=nil bug

View File

@ -299,7 +299,7 @@ function ShortCutToText(ShortCut: TShortCut): string;
implementation
uses
Interfaces, Controls, Forms;
Interfaces;
{ Menu command managment }
@ -464,6 +464,9 @@ end.
{
$Log$
Revision 1.30 2002/10/24 09:37:39 lazarus
MG: broke menus.pp <-> controls.pp circle
Revision 1.29 2002/10/20 21:49:09 lazarus
MG: fixes for fpc1.1