mirror of https://gitlab.com/basile.b/dexed.git
proj inspector, group folders on top of the tree
This commit is contained in:
parent
fb39a431d8
commit
933d3a352f
|
@ -670,6 +670,8 @@ begin
|
||||||
itm.SelectedIndex := 2;
|
itm.SelectedIndex := 2;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
// first pass only creates the folders so that they're shown on top
|
||||||
|
for j := 0 to 1 do
|
||||||
for i := 0 to fProject.sourcesCount-1 do
|
for i := 0 to fProject.sourcesCount-1 do
|
||||||
begin
|
begin
|
||||||
fld := '';
|
fld := '';
|
||||||
|
@ -680,11 +682,12 @@ begin
|
||||||
chd := nil;
|
chd := nil;
|
||||||
fld := rng.takeUntil(['/','\']).yield;
|
fld := rng.takeUntil(['/','\']).yield;
|
||||||
chd := itm.FindNode(fld);
|
chd := itm.FindNode(fld);
|
||||||
if chd.isNil then
|
if chd.isNil and ((rng.empty and (j = 1)) or (not rng.empty and (j = 0))) then
|
||||||
chd := Tree.Items.AddChild(itm, fld);
|
chd := Tree.Items.AddChild(itm, fld);
|
||||||
|
if chd.isNotNil then
|
||||||
itm := chd;
|
itm := chd;
|
||||||
// reached fname
|
// reached fname
|
||||||
if rng.empty then
|
if rng.empty and (j = 1) then
|
||||||
begin
|
begin
|
||||||
itm.Data:= NewStr(fProject.sourceAbsolute(i));
|
itm.Data:= NewStr(fProject.sourceAbsolute(i));
|
||||||
itm.ImageIndex := 2;
|
itm.ImageIndex := 2;
|
||||||
|
|
Loading…
Reference in New Issue