lcl: less with-blocks for FPC 3.1.1

git-svn-id: trunk@50283 -
This commit is contained in:
mattias 2015-11-11 12:55:35 +00:00
parent d51c479ac4
commit 8e6619ee06

View File

@ -1259,18 +1259,15 @@ procedure TCustomForm.MoveToDefaultPosition;
Y := (Y - Source.Top) + ABounds.Top; Y := (Y - Source.Top) + ABounds.Top;
// check that we are still in the desired monitor // check that we are still in the desired monitor
with Target.BoundsRect do if X + Width > ABounds.Right then
begin X := ABounds.Right - Width;
if X + Width > ABounds.Right then if X < ABounds.Left then
X := ABounds.Right - Width; X := ABounds.Left;
if X < ABounds.Left then
X := ABounds.Left;
if Y + Height > ABounds.Bottom then if Y + Height > ABounds.Bottom then
Y := ABounds.Bottom - Height; Y := ABounds.Bottom - Height;
if Y < ABounds.Top then if Y < ABounds.Top then
Y := ABounds.Top; Y := ABounds.Top;
end;
end end
else else
begin begin