mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 19:59:17 +02:00
LCL: TControl.SetAlign: do not clean AnchorSides for alNone, alCustom
git-svn-id: trunk@34077 -
This commit is contained in:
parent
f8e21f206f
commit
21bf214ace
@ -3325,13 +3325,17 @@ begin
|
||||
DisableAutoSizing{$IFDEF DebugDisableAutoSizing}('TControl.setalign'){$ENDIF};
|
||||
OldAlign := FAlign;
|
||||
FAlign := Value;
|
||||
if not (csLoading in ComponentState) then
|
||||
if (not (csLoading in ComponentState))
|
||||
and (Align in [alLeft,alTop,alRight,alBottom,alClient]) then begin
|
||||
// Align for alLeft,alTop,alRight,alBottom,alClient takes precedence
|
||||
// over AnchorSides => clean up
|
||||
for a:=low(TAnchorKind) to High(TAnchorKind) do
|
||||
begin
|
||||
if not (a in AnchorAlign[FAlign]) then continue;
|
||||
AnchorSide[a].Control:=nil;
|
||||
AnchorSide[a].Side:=asrTop;
|
||||
end;
|
||||
end;
|
||||
// Notes:
|
||||
// - if anchors had default values then change them to new default values
|
||||
// This is done for Delphi compatibility.
|
||||
|
Loading…
Reference in New Issue
Block a user