LCL: Simplify code for setting FLastActiveControl.

git-svn-id: trunk@64181 -
This commit is contained in:
juha 2020-12-08 19:34:36 +00:00
parent 24f5f9b1d9
commit b52cbb021d

View File

@ -1931,7 +1931,7 @@ begin
Debugln(['TCustomForm.SetActiveControl ',DbgSName(Self),' FActive=',DbgS(FActive),' OldActiveControl=',DbgSName(FActiveControl),' NewActiveControl=',DbgSName(AWinControl)]);
{$ENDIF}
FActiveControl := AWinControl;
if (FActiveControl<>nil) and (FActiveControl<>Self) and not (FActiveControl is TCustomForm) then
if (FActiveControl<>nil) and not (FActiveControl is TCustomForm) then
FLastActiveControl := FActiveControl;
if Assigned(FActiveControl) then FreeNotification(FActiveControl);
if ([csLoading, csDestroying] * ComponentState = []) then