FindDialog: fix reading actual position the finddialogform for Left and Top. Issue #0030668.

git-svn-id: trunk@53061 -
This commit is contained in:
bart 2016-09-30 20:28:59 +00:00
parent e01bc2c59e
commit 27ba944bdb

View File

@ -423,16 +423,20 @@ end;
function TFindDialog.GetLeft: Integer; function TFindDialog.GetLeft: Integer;
begin begin
if Assigned(FFindForm) then
FFormLeft := FFindForm.Left;
Result:=FFormLeft; Result:=FFormLeft;
end; end;
function TFindDialog.GetPosition: TPoint; function TFindDialog.GetPosition: TPoint;
begin begin
Result:=Point(FFormLeft, FFormTop); Result:=Point(GetLeft, GetTop);
end; end;
function TFindDialog.GetTop: Integer; function TFindDialog.GetTop: Integer;
begin begin
if Assigned(FFindForm) then
FFormTop := FFindForm.Top;
Result:=FFormTop; Result:=FFormTop;
end; end;
@ -464,8 +468,8 @@ end;
procedure TFindDialog.SetPosition(const AValue: TPoint); procedure TFindDialog.SetPosition(const AValue: TPoint);
begin begin
if (FFormLeft <> AValue.x) then Left := AValue.x; if (GetLeft <> AValue.x) then Left := AValue.x;
If (FFormTop <> AValue.y) then Top := AValue.y; If (GetTop <> AValue.y) then Top := AValue.y;
end; end;
procedure TFindDialog.SetTop(const AValue: Integer); procedure TFindDialog.SetTop(const AValue: Integer);