Changeset 185 for Docking/CoolDocking/UCoolDockLayout.pas
- Timestamp:
- Mar 10, 2011, 11:20:08 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/UCoolDockLayout.pas
r184 r185 27 27 UndockSize: TPoint; 28 28 DockStyle: TDockStyle; 29 Processed: Boolean; 29 30 procedure SaveToNode(Node: TDOMNode); 30 31 procedure LoadFromNode(Node: TDOMNode); … … 391 392 FormClass := TFormClass(FindClass('TCoolDockConjoinForm')); 392 393 if FormClass = TCoolDockConjoinForm then begin 393 ParentComponent := TCoolDock ConjoinForm.Create(Application);394 ParentComponent := TCoolDockManager(Form.DockManager).CreateContainer(alNone); 394 395 TCoolDockManager(TCoolDockConjoinForm(ParentComponent).Panel.DockManager).DockStyle := ParentLayoutItem.DockStyle; 395 396 ParentLayoutItem.Restore(TWinControl(ParentComponent)); … … 401 402 if Assigned(ParentComponent) and (ParentComponent is TCoolDockConjoinForm) then 402 403 Form.ManualDock(TCoolDockConjoinForm(ParentComponent).Panel); 403 end else404 if Assigned(Form.HostDockSite) then Form.ManualFloat(Rect.AsTRect);404 end; 405 Processed := True; 405 406 end; 406 407 … … 509 510 I: Integer; 510 511 begin 512 // Undock all forms 513 I := 0; 514 while (I < Application.ComponentCount) do begin 515 if (Application.Components[I] is TForm) then begin 516 Form := (Application.Components[I] as TForm); 517 if Assigned(Form.HostDockSite) then 518 Form.ManualFloat(Rect(Form.Left, Form.Top, Form.Left + Form.Width, Form.Top + Form.Height)); 519 end; 520 Inc(I); 521 end; 522 523 for I := 0 to Items.Count - 1 do 524 with TCoolDockLayoutItem(Items[I]) do 525 Processed := False; 526 511 527 for I := 0 to Items.Count - 1 do 512 528 with TCoolDockLayoutItem(Items[I]) do begin 513 529 Form := TForm(Application.FindComponent(Name)); 514 if Assigned(Form) then Restore(Form);530 if Assigned(Form) and (not Assigned(Form.HostDockSite)) and (not Processed) then Restore(Form); 515 531 end; 516 532 end;
Note:
See TracChangeset
for help on using the changeset viewer.