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;
// check that we are still in the desired monitor
with Target.BoundsRect do
begin
if X + Width > ABounds.Right then
X := ABounds.Right - Width;
if X < ABounds.Left then
X := ABounds.Left;
if X + Width > ABounds.Right then
X := ABounds.Right - Width;
if X < ABounds.Left then
X := ABounds.Left;
if Y + Height > ABounds.Bottom then
Y := ABounds.Bottom - Height;
if Y < ABounds.Top then
Y := ABounds.Top;
end;
if Y + Height > ABounds.Bottom then
Y := ABounds.Bottom - Height;
if Y < ABounds.Top then
Y := ABounds.Top;
end
else
begin