mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 17:29:31 +02:00
dockmanager example: trim root zone after RemoveZone
git-svn-id: trunk@24610 -
This commit is contained in:
parent
b55e278c6e
commit
2609b4a679
@ -1442,11 +1442,17 @@ begin
|
|||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
end;
|
end;
|
||||||
{$IFDEF new}
|
{$IFDEF RootDock}
|
||||||
while FTopZone.FirstChild <> nil do begin
|
while FTopZone.FirstChild <> nil do begin
|
||||||
Zone := FTopZone.FirstChild;
|
Zone := FTopZone.FirstChild;
|
||||||
if Zone.NextSibling <> nil then
|
if Zone.NextSibling <> nil then
|
||||||
break;
|
break; //has multiple kids - done
|
||||||
|
if Zone.ChildControl <> nil then begin
|
||||||
|
//single child, loose orientation
|
||||||
|
FTopZone.Orientation := doNoOrient;
|
||||||
|
Zone.ChildControl.DockOrientation := doNoOrient;
|
||||||
|
break; //done
|
||||||
|
end;
|
||||||
//move zone up
|
//move zone up
|
||||||
FTopZone.FFirstChild := nil;
|
FTopZone.FFirstChild := nil;
|
||||||
zone.Parent := nil;
|
zone.Parent := nil;
|
||||||
@ -1455,13 +1461,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
//check root empty
|
||||||
if FTopZone.FirstChild = nil then
|
if FTopZone.FirstChild = nil then
|
||||||
FTopZone.Orientation := doNoOrient
|
|
||||||
else if FTopZone.FirstChild.NextSibling = nil then begin
|
|
||||||
FTopZone.Orientation := doNoOrient;
|
FTopZone.Orientation := doNoOrient;
|
||||||
FTopZone.FirstChild.ChildControl.DockOrientation := doNoOrient;
|
|
||||||
//bug: not leaf???
|
|
||||||
end;
|
|
||||||
|
|
||||||
//update zone, here simply the whole dock site
|
//update zone, here simply the whole dock site
|
||||||
FSplitter.Hide;
|
FSplitter.Hide;
|
||||||
|
Loading…
Reference in New Issue
Block a user