mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-28 21:20:46 +02:00
lcl: attempt to fix bug #0013162 (MainForm with several invisible forms restoring produces exception)
git-svn-id: trunk@18662 -
This commit is contained in:
parent
18b9f259d5
commit
a0ffd5e9a7
@ -635,10 +635,10 @@ end;
|
|||||||
|
|
||||||
procedure TScreen.RestoreLastActive;
|
procedure TScreen.RestoreLastActive;
|
||||||
begin
|
begin
|
||||||
if FLastActiveControl <> nil then
|
if (FLastActiveControl <> nil) and FLastActiveControl.CanFocus then
|
||||||
FLastActiveControl.SetFocus
|
FLastActiveControl.SetFocus
|
||||||
else
|
else
|
||||||
if FLastActiveCustomForm <> nil then
|
if (FLastActiveCustomForm <> nil) and FLastActiveCustomForm.CanFocus then
|
||||||
FLastActiveCustomForm.SetFocus;
|
FLastActiveCustomForm.SetFocus;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user