mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 14:18:17 +02:00
cocoa: fix tabVisible for active page. Patch by David Jenkins #35172
git-svn-id: trunk@61009 -
This commit is contained in:
parent
ff9256aff6
commit
aecd84036e
@ -59,6 +59,7 @@ type
|
||||
leftmost : Integer; // index of the left-most tab shown
|
||||
|
||||
public
|
||||
ignoreChange: Boolean;
|
||||
callback: ITabControlCallback;
|
||||
|
||||
fulltabs : NSMutableArray; // the full list of NSTabViewItems
|
||||
@ -466,6 +467,7 @@ end;
|
||||
procedure TCocoaTabControl.tabView_willSelectTabViewItem(tabView: NSTabView;
|
||||
tabViewItem: NSTabViewItem);
|
||||
begin
|
||||
if ignoreChange then Exit;
|
||||
if Assigned(callback) then
|
||||
begin
|
||||
callback.willSelectTabViewItem( IndexOfTab( self, tabViewItem) );
|
||||
|
@ -815,7 +815,9 @@ begin
|
||||
i := TCocoaTabControl(ATabControl.Handle).fulltabs.indexOfObject( tb.tabPage );
|
||||
if (i = NSNotFound) then Exit;
|
||||
|
||||
TCocoaTabControl(ATabControl.Handle).ignoreChange := True;
|
||||
TCocoaTabControl(ATabControl.Handle).extselectTabViewItemAtIndex(NSInteger(i));
|
||||
TCocoaTabControl(ATabControl.Handle).ignoreChange := False;
|
||||
end;
|
||||
|
||||
class procedure TCocoaWSCustomTabControl.SetTabPosition(const ATabControl: TCustomTabControl; const ATabPosition: TTabPosition);
|
||||
|
Loading…
Reference in New Issue
Block a user