mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-11 10:39:20 +02:00
LCL: Prevent an exception in TPageControl with a disabled tab. Issue #36282
git-svn-id: branches/fixes_2_0@62850 -
This commit is contained in:
parent
c2436284b0
commit
4ec00f8765
@ -1162,7 +1162,7 @@ begin
|
|||||||
if (FPageIndexOnLastChange >= 0) and (FPageIndexOnLastChange < PageCount) and
|
if (FPageIndexOnLastChange >= 0) and (FPageIndexOnLastChange < PageCount) and
|
||||||
(FPageIndexOnLastChange <> FPageIndex) then
|
(FPageIndexOnLastChange <> FPageIndex) then
|
||||||
begin
|
begin
|
||||||
if Assigned(CurPage) and HasFocusedControl(Page[FPageIndexOnLastChange]) then
|
if Assigned(CurPage) and CurPage.enabled and HasFocusedControl(Page[FPageIndexOnLastChange]) then
|
||||||
CurPage.SetFocus;
|
CurPage.SetFocus;
|
||||||
Page[FPageIndexOnLastChange].Visible := False;
|
Page[FPageIndexOnLastChange].Visible := False;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user