IDE: debug componentstate

git-svn-id: trunk@44279 -
This commit is contained in:
mattias 2014-02-27 12:49:45 +00:00
parent dabd5d7e4c
commit ad284bb8ab
2 changed files with 19 additions and 1 deletions

View File

@ -115,6 +115,8 @@ function GetComponentHeight(AComponent: TComponent): integer;
procedure InvalidateDesignerRect(aHandle: HWND; ARect: pRect);
procedure WriteComponentStates(aComponent: TComponent; Recursive: boolean;
const Prefix: string = '');
implementation
@ -312,6 +314,19 @@ begin
InvalidateRect(aHandle,@InvRect,false);
end;
procedure WriteComponentStates(aComponent: TComponent; Recursive: boolean;
const Prefix: string);
var
i: Integer;
begin
if aComponent=nil then exit;
debugln([Prefix,DbgSName(aComponent),' ',dbgs(aComponent.ComponentState)]);
if Recursive then begin
for i:=0 to aComponent.ComponentCount-1 do
WriteComponentStates(aComponent.Components[i],true,Prefix+' ');
end;
end;
function GetParentLevel(AControl: TControl): integer;
begin
Result:=0;

View File

@ -45,7 +45,7 @@ uses
Classes, SysUtils, AvgLvlTree, BasicCodeTools, TypInfo, LCLProc, LResources,
Forms, Controls, LCLMemManager, LCLIntf, Dialogs,
PropEditUtils, PropEdits, UnitResources, IDEDialogs,
IDEProcs, PackageDefs, BasePkgManager;
IDEProcs, PackageDefs, BasePkgManager, DesignerProcs;
type
//----------------------------------------------------------------------------
@ -959,6 +959,9 @@ begin
end;
end;
end;
{$IFDEF VerboseJITForms}
WriteComponentStates(FCurReadJITComponent,true);
{$ENDIF}
FCurReadStreamClass:=nil;
FCurReadJITComponent:=nil;
FContextObject:=nil;