cocoa: allowing tab controls to be switched at design time

git-svn-id: trunk@61489 -
This commit is contained in:
dmitry 2019-06-28 20:05:33 +00:00
parent a5f0691467
commit 7ffa3b81af

View File

@ -544,10 +544,16 @@ end;
procedure TCocoaTabControl.mouseDown(event: NSEvent);
var
res : Boolean;
itm : NSTabViewItem;
begin
res := callback.MouseUpDownEvent(event, false, true);
if not Assigned(callback) or not res then
itm := self.tabViewItemAtPoint( self.convertPoint_fromView(event.locationInWindow, nil ));
if Assigned(itm) then
begin
inherited mouseDown(event);
Exit;
end;
if not (Assigned(callback) and callback.MouseUpDownEvent(event, false, true)) then
begin
inherited mouseDown(event);