easydock: docking to docksite

git-svn-id: trunk@25723 -
This commit is contained in:
mattias 2010-05-28 00:02:34 +00:00
parent 7b26624558
commit e3a13c09b5

View File

@ -151,6 +151,7 @@ begin
try try
if not (IsDockSite(AForm) or IsDockable(AForm)) then if not (IsDockSite(AForm) or IsDockable(AForm)) then
begin begin
AForm.DisableAlign;
// this form was not yet docked // this form was not yet docked
// place it at a default position and make it dockable // place it at a default position and make it dockable
GetDefaultBounds(AForm,Creator,NewBounds,DockSiblingName,DockAlign); GetDefaultBounds(AForm,Creator,NewBounds,DockSiblingName,DockAlign);
@ -171,7 +172,11 @@ begin
if DockSibling<>nil then if DockSibling<>nil then
begin begin
NewDockSite:=DockSibling.HostDockSite; NewDockSite:=DockSibling.HostDockSite;
AForm.ManualDock(NewDockSite,DockSibling,DockAlign); debugln(['TIDEEasyDockMaster.ShowForm NewDockSite=',DbgSName(NewDockSite)]);
if NewDockSite<>nil then
AForm.ManualDock(NewDockSite,nil,DockAlign)
else
AForm.ManualDock(nil,DockSibling,DockAlign);
end; end;
end; end;
if AForm.Parent=nil then begin if AForm.Parent=nil then begin
@ -181,6 +186,7 @@ begin
MakeIDEWindowDockable(AForm); MakeIDEWindowDockable(AForm);
end; end;
end; end;
AForm.EnableAlign;
end; end;
finally finally
@ -192,7 +198,7 @@ begin
else else
Parent.Show; Parent.Show;
end; end;
debugln(['TIDEEasyDockMaster.ShowForm END ',DbgSName(AForm)]); debugln(['TIDEEasyDockMaster.ShowForm END ',DbgSName(AForm),' ',dbgs(AForm.BoundsRect)]);
end; end;
initialization initialization