From 902e862bf2493c1f12e90d2204281d2f8eebaf5b Mon Sep 17 00:00:00 2001 From: Dmitry Boyarintsev Date: Fri, 3 Sep 2021 21:25:21 -0400 Subject: [PATCH] cocoa: evaluating the need of next and prev arrows on the change of the tab caption (cherry picked from commit 90efbfef0fad539d0d83b9ef51c4f1f8750c408f) --- lcl/interfaces/cocoa/cocoawscomctrls.pas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lcl/interfaces/cocoa/cocoawscomctrls.pas b/lcl/interfaces/cocoa/cocoawscomctrls.pas index 700b594367..ba49d1e950 100644 --- a/lcl/interfaces/cocoa/cocoawscomctrls.pas +++ b/lcl/interfaces/cocoa/cocoawscomctrls.pas @@ -644,6 +644,12 @@ begin page := GetCocoaTabPageFromHandle(AWinControl.Handle); if not Assigned(page) then Exit; page.setLabel(ControlTitleToNSStr(AText)); + + if (AWinControl.Parent <> nil) + and (AWinControl.Parent is TCustomTabControl) + and (AWinControl.HandleAllocated) + then + UpdateTabAndArrowVisibility( TCocoaTabControl(AWinControl.Parent.Handle) ); end; class function TCocoaWSCustomPage.GetText(const AWinControl: TWinControl;