mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 16:49:12 +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
|
leftmost : Integer; // index of the left-most tab shown
|
||||||
|
|
||||||
public
|
public
|
||||||
|
ignoreChange: Boolean;
|
||||||
callback: ITabControlCallback;
|
callback: ITabControlCallback;
|
||||||
|
|
||||||
fulltabs : NSMutableArray; // the full list of NSTabViewItems
|
fulltabs : NSMutableArray; // the full list of NSTabViewItems
|
||||||
@ -466,6 +467,7 @@ end;
|
|||||||
procedure TCocoaTabControl.tabView_willSelectTabViewItem(tabView: NSTabView;
|
procedure TCocoaTabControl.tabView_willSelectTabViewItem(tabView: NSTabView;
|
||||||
tabViewItem: NSTabViewItem);
|
tabViewItem: NSTabViewItem);
|
||||||
begin
|
begin
|
||||||
|
if ignoreChange then Exit;
|
||||||
if Assigned(callback) then
|
if Assigned(callback) then
|
||||||
begin
|
begin
|
||||||
callback.willSelectTabViewItem( IndexOfTab( self, tabViewItem) );
|
callback.willSelectTabViewItem( IndexOfTab( self, tabViewItem) );
|
||||||
|
@ -815,7 +815,9 @@ begin
|
|||||||
i := TCocoaTabControl(ATabControl.Handle).fulltabs.indexOfObject( tb.tabPage );
|
i := TCocoaTabControl(ATabControl.Handle).fulltabs.indexOfObject( tb.tabPage );
|
||||||
if (i = NSNotFound) then Exit;
|
if (i = NSNotFound) then Exit;
|
||||||
|
|
||||||
|
TCocoaTabControl(ATabControl.Handle).ignoreChange := True;
|
||||||
TCocoaTabControl(ATabControl.Handle).extselectTabViewItemAtIndex(NSInteger(i));
|
TCocoaTabControl(ATabControl.Handle).extselectTabViewItemAtIndex(NSInteger(i));
|
||||||
|
TCocoaTabControl(ATabControl.Handle).ignoreChange := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
class procedure TCocoaWSCustomTabControl.SetTabPosition(const ATabControl: TCustomTabControl; const ATabPosition: TTabPosition);
|
class procedure TCocoaWSCustomTabControl.SetTabPosition(const ATabControl: TCustomTabControl; const ATabPosition: TTabPosition);
|
||||||
|
Loading…
Reference in New Issue
Block a user