lcl: wincontrol: ignore FBoundsRealized in WM_SIZE if AutoSize is disabled. Solves part of issue #31715

git-svn-id: trunk@54811 -
This commit is contained in:
ondrej 2017-05-05 19:58:13 +00:00
parent ee8a7ab7a7
commit 9adb1436a5

View File

@ -6968,10 +6968,13 @@ begin
' wcfClientRectNeedsUpdate=',wcfClientRectNeedsUpdate in FWinControlFlags]);
{$ENDIF}
NewLeft := FBoundsRealized.Left;
NewTop := FBoundsRealized.Top;
if HandleAllocated then
GetWindowRelativePosition(Handle, NewLeft, NewTop);
if not AutoSizeDelayed then // FBoundsRealized are wrong if AutoSize is disabled
begin
NewLeft := FBoundsRealized.Left;
NewTop := FBoundsRealized.Top;
if HandleAllocated then
GetWindowRelativePosition(Handle, NewLeft, NewTop);
end;
//if CheckPosition(Self) then
//DebugLn(['TWinControl.WMSize GetWindowRelativePosition: ',DbgSName(Self),' ',NewLeft,',',NewTop,' ClientRectNeedsInterfaceUpdate=',ClientRectNeedsInterfaceUpdate]);
NewBoundsRealized := Bounds(NewLeft, NewTop, Message.Width, Message.Height);