From 90efbfef0fad539d0d83b9ef51c4f1f8750c408f 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 --- 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 79cf7cd51b..a905635d20 100644 --- a/lcl/interfaces/cocoa/cocoawscomctrls.pas +++ b/lcl/interfaces/cocoa/cocoawscomctrls.pas @@ -645,6 +645,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;