mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 02:49:19 +02:00
cocoa: additional check on processing tab switch event. Need to investigate why a page view doesn't have any subview
git-svn-id: trunk@58514 -
This commit is contained in:
parent
fb5dac044d
commit
f0aa55068a
@ -236,12 +236,18 @@ var
|
|||||||
begin
|
begin
|
||||||
Result:=aTabIndex;
|
Result:=aTabIndex;
|
||||||
if not Assigned(trg) or not (trg is TCustomTabControl) then Exit;
|
if not Assigned(trg) or not (trg is TCustomTabControl) then Exit;
|
||||||
if (aTabIndex<0) or (atabIndex>=src.fulltabs.count) then begin
|
if (aTabIndex<0) or (atabIndex>=src.fulltabs.count) then
|
||||||
|
begin
|
||||||
aTabIndex:=-1;
|
aTabIndex:=-1;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
tbitem:=TCocoaTabPage(src.fulltabs.objectAtIndex(aTabIndex));
|
tbitem:=TCocoaTabPage(src.fulltabs.objectAtIndex(aTabIndex));
|
||||||
|
if NSView(tbitem.view).subviews.count=0 then
|
||||||
|
begin
|
||||||
|
aTabIndex:=-1;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
hnd := HWND(NSView(tbitem.view).subviews.objectAtIndex(0));
|
hnd := HWND(NSView(tbitem.view).subviews.objectAtIndex(0));
|
||||||
|
|
||||||
tb:=TCustomTabControl(trg);
|
tb:=TCustomTabControl(trg);
|
||||||
|
Loading…
Reference in New Issue
Block a user