IDE: codebrowser: if there are only a few items, expand the whole tree

git-svn-id: trunk@43892 -
This commit is contained in:
mattias 2014-02-05 10:46:49 +00:00
parent 551badbbf0
commit 2a8c03ce41

View File

@ -2311,6 +2311,7 @@ var
var
lvl: TCodeBrowserLevel;
i: Integer;
begin
ShowPackages:=Options.HasLevel(cblPackages);
ShowUnits:=Options.HasLevel(cblUnits);
@ -2341,6 +2342,11 @@ begin
// create treeview nodes
AddTreeNodes(ViewRoot,nil);
// if there are only a few items expand the whole tree
if BrowseTreeView.Items.Count<30 then
for i:=0 to BrowseTreeView.Items.TopLvlCount-1 do
BrowseTreeView.Items.TopLvlItems[i].Expand(true);
finally
CodeToolBoss.DeactivateWriteLock;
//DebugLn(['TCodeBrowserView.UpdateTreeView EndUpdate']);