mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-22 14:59:30 +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;
|
||||
begin
|
||||
if FLastActiveControl <> nil then
|
||||
if (FLastActiveControl <> nil) and FLastActiveControl.CanFocus then
|
||||
FLastActiveControl.SetFocus
|
||||
else
|
||||
if FLastActiveCustomForm <> nil then
|
||||
if (FLastActiveCustomForm <> nil) and FLastActiveCustomForm.CanFocus then
|
||||
FLastActiveCustomForm.SetFocus;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user