From 8c77c2caa3b946fc2ef4aa04a10f82ac93f0783f Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Sun, 10 Oct 2021 23:22:38 +0200 Subject: [PATCH] fix, dub proj inspector tree empty if proj organized by subpackages --- CHANGELOG.md | 1 + src/u_dubproject.pas | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d142dc31..b0271641 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ - diff dialog: the content reloaded matched to the state when the dialog was shown, not when closed. (#97) - editor, debugging: during a debugging session, wrong icon displayed when a breakpoint is removed. +- DUB project inspector: the tree was empty if the project is moslty organized in subpackages. - DUB projects: version number without the patch component were not accepted. # v3.9.12 diff --git a/src/u_dubproject.pas b/src/u_dubproject.pas index 5746ad72..6fe031ff 100644 --- a/src/u_dubproject.pas +++ b/src/u_dubproject.pas @@ -1405,6 +1405,11 @@ begin if fJSON.findArray('sourceFiles', arr) then for i := 0 to arr.Count-1 do tryAddRelOrAbsFile(arr.Strings[i]); + // subpackages + if fJSON.findArray('subPackages', arr) then + for i := 0 to arr.Count-1 do + tryAddFromFolder(fBasePath + arr.Strings[i]); + // by config conf := getCurrentCustomConfig; if conf.isAssigned then begin @@ -1426,6 +1431,10 @@ begin else tryAddFromFolder(expandFilenameEx(fBasePath, pth)); end; + // subpackages + if conf.findArray('subPackages', arr) then + for i := 0 to arr.Count-1 do + tryAddFromFolder(fBasePath + arr.Strings[i]); // custom files in current config if conf.findArray('sourceFiles', arr) then for i := 0 to arr.Count-1 do