mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-10 22:39:18 +02:00
Cocoa: tab control: fix GetTabIndexAtPos result
git-svn-id: trunk@57869 -
This commit is contained in:
parent
a7a95f8f65
commit
d1b941a029
@ -494,7 +494,7 @@ var
|
||||
lTabPage: NSTabViewItem;
|
||||
lClientPos: NSPoint;
|
||||
begin
|
||||
Result := 0;
|
||||
Result := -1;
|
||||
if not Assigned(ATabControl) or not ATabControl.HandleAllocated then Exit;
|
||||
lTabControl := TCocoaTabControl(ATabControl.Handle);
|
||||
|
||||
@ -506,6 +506,8 @@ begin
|
||||
else
|
||||
lClientPos := LCLToNSPoint(AClientPos, lTabControl.frame.size.height);
|
||||
lTabPage := lTabControl.tabViewItemAtPoint(lClientPos);
|
||||
if not Assigned(lTabPage) then
|
||||
Exit;
|
||||
Result := lTabControl.indexOfTabViewItem(lTabPage);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user