Changeset 216 for Docking/CoolDocking/Managers/UCDManagerRegions.pas
- Timestamp:
- Mar 22, 2011, 9:49:17 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Docking/CoolDocking/Managers/UCDManagerRegions.pas
r215 r216 80 80 //Canvas.FillRect(R); 81 81 if Visible then begin 82 if ControlPanel.DockClientCount = 0 then 83 Header.DrawGrabber(Canvas, Control) else 84 Header.DrawGrabber(Canvas, ControlPanel); 82 Header.Invalidate; 85 83 end; 86 84 end; … … 201 199 // Direction change, create conjoin form 202 200 NewConjoinDockForm := CreateContainer(InsertAt); 203 NewDockSite := DockSite.HostDockSite; 204 // FDockSite.ManualFloat(FDockSite.BoundsRect); 205 NewConjoinDockForm.ManualDock(NewDockSite); 206 Control.ManualDock(NewConjoinDockForm, nil, InsertAt); 207 if DockSite is TForm then 208 DockSite.ManualDock(NewConjoinDockForm) 209 else 210 if DockSite is TPanel then 211 DockSite.Parent.ManualDock(NewConjoinDockForm); 201 FreeParentIfEmpty := False; 202 for I := DockSite.DockClientCount - 1 downto 0 do begin 203 DockSite.DockClients[I].ManualDock(NewConjoinDockForm); 204 end; 205 FreeParentIfEmpty := True; 206 NewConjoinDockForm.ManualDock(DockSite); 207 Control.ManualDock(DockSite, nil, InsertAt); 208 NewConjoinDockForm.UpdateCaption; 212 209 UpdateClientSize; 213 210 Exit; … … 233 230 234 231 //if TCDManager(Manager).DockSite.DockClientCount = 2 then FDockDirection := ddNone; 235 if ClientCount = 1then begin232 if FreeParentIfEmpty and (ClientCount = 1) then begin 236 233 // Last removed control => Free parent if it is TCDConjoinForm 237 234 if Self.DockSite is TCDConjoinForm then … … 241 238 end else TCDManagerItem(DockItems[0]).Control.ManualFloat(Rect(Left, Top, Left + Width, Top + Height)); 242 239 ManualFloat(Rect(Left, Top, Left + Width, Top + Height)); 240 inherited RemoveControl(Control); 243 241 Free; 242 Exit; 244 243 end; 245 244 end;
Note:
See TracChangeset
for help on using the changeset viewer.