mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-15 21:29:50 +02:00
AnchorDocking: Cocoa: Fix the issue that the embedded form is not activated in TAnchorDockPage
This commit is contained in:
parent
8a50d9bf15
commit
1d7346c7e9
@ -2465,6 +2465,19 @@ function TAnchorDockMaster.RestoreLayout(Tree: TAnchorDockLayoutTree;
|
||||
AControl.Align:=alClient;
|
||||
for Side:=Low(TAnchorKind) to high(TAnchorKind) do
|
||||
AControl.AnchorSide[Side].Control:=nil;
|
||||
{$IFDEF LCLCOCOA}
|
||||
// trigger page to be ready, mainly for embedded Forms.
|
||||
// eg. BreakPoints, Search Results, will be empty without trigger.
|
||||
// for the embedding Form in TPageControl, the embedding Form cannot
|
||||
// be self activated in Cocoa Interface.
|
||||
// after long research, here is the least invasive.
|
||||
// see also: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39763#note_1408260128
|
||||
if AControl is TWinControl then
|
||||
begin
|
||||
TWinControl(AControl).HandleNeeded;
|
||||
Site.Pages.PageIndex:= i;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
Site.Pages.PageIndex:=ANode.PageIndex;
|
||||
finally
|
||||
|
Loading…
Reference in New Issue
Block a user