IDE, fix compiling and some corruption on logging when VerboseMenuIntf directive is enabled

git-svn-id: trunk@51475 -
This commit is contained in:
jesus 2016-02-02 06:19:08 +00:00
parent 405f94df44
commit f4900d9e51
3 changed files with 8 additions and 4 deletions

View File

@ -1313,7 +1313,10 @@ begin
FreeSeparators;
for i:=FItems.Count-1 downto 0 do TObject(FItems[i]).Free;
for i:=FItems.Count-1 downto 0 do begin
TObject(FItems[i]).Free;
FItems[i] := nil;
end;
FItems.Clear;
FChildMenuItemsCreated:=false;
FVisibleCount:=0;
@ -1502,7 +1505,8 @@ begin
' ContainerIndex=',GetContainerIndex(false),
' NeedSep:Top=',NeedTopSeparator,',Bottom=',NeedBottomSeparator,
' Size=',dbgs(Size)]);
for i:=0 to Count-1 do Items[i].WriteDebugReport(Prefix+' ',false);
for i:=0 to Count-1 do
if Items[i]<>nil then Items[i].WriteDebugReport(Prefix+' ',false);
if MenuItemDebugReport and (MenuItem<>nil) then
MenuItem.WriteDebugReport(Prefix);
end;

View File

@ -3850,7 +3850,7 @@ begin
// assign the root TMenuItem to the registered menu root.
// This will automatically create all registered items
{$IFDEF VerboseMenuIntf}
DesignerPopupMenu.Items.WriteDebugReport('TSourceNotebook.BuildPopupMenu ');
FDesignerPopupMenu.Items.WriteDebugReport('TSourceNotebook.BuildPopupMenu ');
DesignerMenuRoot.ConsistencyCheck;
{$ENDIF}
DesignerMenuRoot.MenuItem := FDesignerPopupMenu.Items;

View File

@ -7041,7 +7041,7 @@ procedure TSourceNotebook.RemoveContextMenuItems;
begin
SrcEditMenuSectionFileDynamic.Clear;
{$IFDEF VerboseMenuIntf}
SrcEditMenuSectionFileDynamic.WriteDebugReport('TSourceNotebook.RemoveContextMenuItems ');
SrcEditMenuSectionFileDynamic.WriteDebugReport('TSourceNotebook.RemoveContextMenuItems ', true);
{$ENDIF}
end;