menuintf: fix SetChildsAsSubMenu section bug

git-svn-id: trunk@20702 -
This commit is contained in:
paul 2009-06-22 02:51:28 +00:00
parent 1a7372fe49
commit 5e0c647868

View File

@ -1172,9 +1172,11 @@ end;
constructor TIDEMenuSection.Create(const TheName: string);
begin
inherited Create(TheName);
FSize:=0;
FChildsAsSubMenu:=true;
FItems:=TFPList.Create;
FSize := 0;
FChildsAsSubMenu := True;
FNeedTopSeparator := False;
FNeedBottomSeparator := False;
FItems := TFPList.Create;
end;
destructor TIDEMenuSection.Destroy;
@ -1484,6 +1486,10 @@ begin
{$IFDEF VerboseMenuIntf}
debugln('TIDEMenuSection.SetChildsAsSubMenu Name="',Name,'"');
{$ENDIF}
if AValue then
Section.UpdateSize(1)
else
Section.UpdateSize(-1);
Section.UpdateMenuStructure;
end;
end;