Ignore:
Timestamp:
Mar 10, 2011, 9:57:21 AM (14 years ago)
Author:
george
Message:
  • Fixed: Placing new form inside regions with different orientation.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Docking/CoolDocking/UCoolDockStyleRegions.pas

    r183 r184  
    7373        NewDockSite := DockSite.HostDockSite;
    7474        // FDockSite.ManualFloat(FDockSite.BoundsRect);
     75        AControl.ManualDock(NewConjoinDockForm.Panel, nil, InsertAt);
     76        if DockSite is TForm then
     77          DockSite.ManualDock(NewConjoinDockForm.Panel)
     78        else
     79        if DockSite is TPanel then
     80          DockSite.Parent.ManualDock(NewConjoinDockForm.Panel);
    7581        NewConjoinDockForm.ManualDock(NewDockSite);
    76         DockSite.ManualDock(NewConjoinDockForm.Panel);
    77         AControl.ManualDock(NewConjoinDockForm.Panel, nil, InsertAt);
     82        UpdateClientSize;
    7883        Exit;
    7984      end;
     
    8388    with NewPanel do begin
    8489      Parent := TCoolDockManager(Manager).DockSite;
    85       OwnerDockManager := Self;
     90      OwnerDockManager := Manager;
    8691      if DockStyle = dsList then Visible := True;
    8792      Header.PopupMenu := TCoolDockManager(Manager).PopupMenu;
     
    103108
    104109procedure TCoolDockStyleRegions.RemoveControl(Control: TControl);
    105 begin
     110var
     111  ClientPanel: TCoolDockClientPanel;
     112begin
     113  ClientPanel := TCoolDockManager(Manager).FindControlInPanels(Control);
     114  Control.RemoveHandlerOnVisibleChanged(ClientPanel.VisibleChange);
     115
    106116  if TCoolDockManager(Manager).DockSite.DockClientCount = 2 then FDockDirection := ddNone;
    107117  inherited RemoveControl(Control);
     
    174184    Splitter.Parent := TCoolDockManager(Manager).DockSite;
    175185    Splitter.Align := BaseAlign;
    176     Splitter.Visible := True;
     186    Splitter.Visible := I < (DockPanels.Count - 1);
    177187
    178188
Note: See TracChangeset for help on using the changeset viewer.