mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 20:19:14 +02:00
lcl: formatting
git-svn-id: trunk@20074 -
This commit is contained in:
parent
bdda69cd5d
commit
869fadf0a6
@ -1755,15 +1755,15 @@ var
|
||||
CurControl: TWinControl;
|
||||
begin
|
||||
Result := False;
|
||||
if (Control<>nil)
|
||||
and (csDestroying in Control.ComponentState) then exit;
|
||||
if (Control <> nil) and (csDestroying in Control.ComponentState) then Exit;
|
||||
|
||||
if (Parent<>nil) then begin
|
||||
if (Parent <> nil) then
|
||||
begin
|
||||
// delegate to topmost form
|
||||
ParentForm:=GetParentForm(Self);
|
||||
if ParentForm<>nil then
|
||||
ParentForm := GetParentForm(Self);
|
||||
if ParentForm <> nil then
|
||||
ParentForm.SetFocusedControl(Control);
|
||||
exit;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
// update FActiveControl
|
||||
@ -1797,14 +1797,16 @@ begin
|
||||
|
||||
Result := True;
|
||||
|
||||
if (Control<>nil) and (not (csFocusing in Control.ControlState)) then begin
|
||||
if (Control <> nil) and (not (csFocusing in Control.ControlState)) then
|
||||
begin
|
||||
// prevent looping
|
||||
// update ActiveControls of all parent forms
|
||||
CurControl:=Control.Parent;
|
||||
while CurControl<>nil do begin
|
||||
CurControl := Control.Parent;
|
||||
while CurControl <> nil do
|
||||
begin
|
||||
if CurControl is TCustomForm then
|
||||
TCustomForm(CurControl).FActiveControl:=Control;
|
||||
CurControl:=CurControl.Parent;
|
||||
TCustomForm(CurControl).FActiveControl := Control;
|
||||
CurControl := CurControl.Parent;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user