mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 14:18:17 +02:00
AnchorDocking: Cocoa: a better way to fix the issue that the embedded form is not shown in TAnchorDockPage
This commit is contained in:
parent
13a8e36d2f
commit
e0ab60ad95
@ -2468,19 +2468,6 @@ 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
|
||||
|
@ -808,6 +808,7 @@ begin
|
||||
begin
|
||||
if AParams.WndParent <> 0 then
|
||||
begin
|
||||
cnt.isembedded:= true;
|
||||
lDestView := NSObject(AParams.WndParent).lclContentView;
|
||||
lDestView.addSubView(cnt);
|
||||
//cnt.setAutoresizingMask(NSViewMaxXMargin or NSViewMinYMargin);
|
||||
|
Loading…
Reference in New Issue
Block a user