anchordocking: really find MainIDE site in AdjustMainIDEWindowHeight.

git-svn-id: trunk@51347 -
This commit is contained in:
ondrej 2016-01-19 20:35:05 +00:00
parent ca7210f335
commit be1b2f57c3

View File

@ -42,7 +42,7 @@ uses
// LazUtils
LazFileCache, LazFileUtils,
// IdeIntf
LCLIntf, IDEWindowIntf, IDEOptionsIntf,
LCLIntf, IDEWindowIntf, IDEOptionsIntf, LazIDEIntf,
// AnchorDocking
AnchorDockStr, AnchorDocking, AnchorDesktopOptions, AnchorDockOptionsDlg;
@ -266,13 +266,16 @@ begin
Site := nil;
for I := 0 to AIDEWindow.ControlCount-1 do
if AIDEWindow.Controls[I] is TAnchorDockHostSite then
begin
Site := TAnchorDockHostSite(AIDEWindow.Controls[I]);
Break;
end;
if AIDEWindow.Controls[I] is TAnchorDockHostSite then
begin
Site := TAnchorDockHostSite(AIDEWindow.Controls[I]);
if (Site.Parent<>nil) and (Site.Parent=LazarusIDE.GetMainBar) then
Break // found
else
Site := nil;
end;
if not Assigned(Site) then
if (Site=nil) or (Site.BoundSplitter=nil) then
Exit;
Site.BoundSplitter.Enabled := not AAdjustHeight;