MG: fixed Menu.Free and gdkwindow=nil bug

git-svn-id: trunk@3363 -
This commit is contained in:
lazarus 2002-09-19 16:45:54 +00:00
parent 7460fce057
commit e940f8c711
3 changed files with 13 additions and 3 deletions

View File

@ -32,7 +32,7 @@ unit CustomFormEditor;
interface
{$DEFINE VerboseFormEditor}
{ $DEFINE VerboseFormEditor}
uses
{$IFDEF IDE_MEM_CHECK}

View File

@ -81,6 +81,9 @@ 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;
@ -170,6 +173,9 @@ end;
{ =============================================================================
$Log$
Revision 1.13 2002/09/19 16:45:54 lazarus
MG: fixed Menu.Free and gdkwindow=nil bug
Revision 1.12 2002/08/22 13:45:58 lazarus
MG: fixed non AutoCheck menuitems and editor bookmark popupmenu

View File

@ -45,7 +45,8 @@ interface
{$endif}
uses
VCLGlobals, Classes, SysUtils, LMessages, ActnList, Graphics, ImgList;
Classes, SysUtils, LCLLinux, LCLType, VCLGlobals, LMessages,
ActnList, Graphics, ImgList;
type
@ -298,7 +299,7 @@ function ShortCutToText(ShortCut: TShortCut): string;
implementation
uses
Interfaces, LCLLinux, LCLType;
Interfaces, Controls, Forms;
{ Menu command managment }
@ -463,6 +464,9 @@ end.
{
$Log$
Revision 1.27 2002/09/19 16:45:54 lazarus
MG: fixed Menu.Free and gdkwindow=nil bug
Revision 1.26 2002/08/22 13:45:57 lazarus
MG: fixed non AutoCheck menuitems and editor bookmark popupmenu