mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 15:25:07 +02:00
fix carbon notebook moving page select switch
git-svn-id: trunk@21463 -
This commit is contained in:
parent
bb3984fa0a
commit
d06b99c12b
@ -951,8 +951,6 @@ begin
|
||||
ATab.Attach(Self);
|
||||
|
||||
UpdateTabs;
|
||||
// sync PageIndex with LCL
|
||||
SetPageIndex(TCustomNotebook(LCLObject).PageIndex);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -964,8 +962,6 @@ end;
|
||||
procedure TCarbonTabsControl.Remove(AIndex: Integer);
|
||||
begin
|
||||
Remove(FTabs[AIndex] as TCarbonTab);
|
||||
// sync PageIndex with LCL
|
||||
SetPageIndex(TCustomNotebook(LCLObject).PageIndex);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -256,6 +256,8 @@ begin
|
||||
AChild.HandleNeeded;
|
||||
// add page
|
||||
TCarbonTabsControl(ANotebook.Handle).Add(TCarbonTab(AChild.Handle), AIndex);
|
||||
// sync PageIndex with LCL
|
||||
TCarbonTabsControl(ANotebook.Handle).SetPageIndex(ANotebook.PageIndex);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
@ -289,6 +291,8 @@ begin
|
||||
if not CheckHandle(ANotebook, Self, 'RemovePage') then Exit;
|
||||
|
||||
TCarbonTabsControl(ANotebook.Handle).Remove(AIndex);
|
||||
// sync PageIndex with LCL
|
||||
TCarbonTabsControl(ANotebook.Handle).SetPageIndex(ANotebook.PageIndex);
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user