lcl: add TControl.AutoSizingLockCount protected read only property for use in child classes,

don't remove fsDisableAutoSize in TCustomForm.WMPaint handler if we are inside AutoSizing (fixes bug #0013378)

git-svn-id: trunk@19071 -
This commit is contained in:
paul 2009-03-23 09:34:48 +00:00
parent 84f98a4450
commit 9713e8b48c
2 changed files with 4 additions and 2 deletions

View File

@ -995,7 +995,8 @@ type
function IsClientHeightStored: boolean; virtual;
function IsClientWidthStored: boolean; virtual;
property AutoSizing: Boolean Read FAutoSizing;
property AutoSizing: Boolean read FAutoSizing;
property AutoSizingLockCount: Integer read FAutoSizingLockCount;
protected
// protected messages
procedure WMCancelMode(var Message: TLMessage); message LM_CANCELMODE;

View File

@ -517,7 +517,8 @@ end;
procedure TCustomForm.WMPaint(var Message: TLMPaint);
begin
//DebugLn('[TCustomForm.WMPaint] ',Name,':',ClassName);
Include(FFormState,fsDisableAutoSize);
if AutoSizingLockCount = 0 then
Include(FFormState, fsDisableAutoSize);
inherited WMPaint(Message);
//DebugLn('[TCustomForm.WMPaint] END ',Name,':',ClassName);
end;