mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-06 01:57:16 +01:00
LCL: freenotification for FActiveControl
git-svn-id: trunk@26192 -
This commit is contained in:
parent
7f2eb77ee8
commit
95729106bc
@ -425,7 +425,7 @@ var
|
||||
begin
|
||||
if [csLoading,csDestroying]*ComponentState<>[] then exit;
|
||||
if (FActiveControl <> nil) and (FDesigner = nil) then
|
||||
NewFocusControl := FActiveControl
|
||||
NewFocusControl := ActiveControl
|
||||
else
|
||||
NewFocusControl := Self;
|
||||
{$IFDEF VerboseFocus}
|
||||
@ -1727,6 +1727,7 @@ begin
|
||||
{$ENDIF}
|
||||
|
||||
FActiveControl := AWinControl;
|
||||
if FActiveControl<>nil then FreeNotification(FActiveControl);
|
||||
if ([csLoading, csDestroying] * ComponentState = []) then
|
||||
begin
|
||||
if FActive then
|
||||
@ -2243,9 +2244,11 @@ begin
|
||||
// update FActiveControl
|
||||
if (FDesigner = nil) and (not (csLoading in ComponentState)) then
|
||||
begin
|
||||
if Control <> Self then
|
||||
FActiveControl := Control
|
||||
else
|
||||
if Control <> Self then begin
|
||||
FActiveControl := Control;
|
||||
if FActiveControl<>nil then
|
||||
FreeNotification(FActiveControl);
|
||||
end else
|
||||
FActiveControl := nil;
|
||||
end;
|
||||
|
||||
@ -2279,8 +2282,10 @@ begin
|
||||
CurControl := Control.Parent;
|
||||
while CurControl <> nil do
|
||||
begin
|
||||
if CurControl is TCustomForm then
|
||||
if CurControl is TCustomForm then begin
|
||||
TCustomForm(CurControl).FActiveControl := Control;
|
||||
TCustomForm(CurControl).FreeNotification(Control);
|
||||
end;
|
||||
CurControl := CurControl.Parent;
|
||||
end;
|
||||
Result := SendEnterExitLoop;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user