mirror of https://gitlab.com/basile.b/dexed.git
improved performances when redefining DCD imports
This commit is contained in:
parent
c91e8e47f8
commit
bd9cc5cbdf
|
@ -120,19 +120,30 @@ procedure TCEDcdWrapper.projChanged(aProject: TCEProject);
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
fold: string;
|
fold: string;
|
||||||
|
folds: TStringList;
|
||||||
begin
|
begin
|
||||||
if fProj <> aProject then
|
if fProj <> aProject then
|
||||||
exit;
|
exit;
|
||||||
if fProj = nil then
|
if fProj = nil then
|
||||||
exit;
|
exit;
|
||||||
//
|
//
|
||||||
for i:= 0 to fProj.Sources.Count-1 do
|
folds := TStringList.Create;
|
||||||
addImportFolder(extractFilePath(fProj.getAbsoluteSourceName(i)));
|
try
|
||||||
for i := 0 to fProj.currentConfiguration.pathsOptions.importModulePaths.Count-1 do
|
for i:= 0 to fProj.Sources.Count-1 do
|
||||||
begin
|
begin
|
||||||
fold := fProj.currentConfiguration.pathsOptions.importModulePaths.Strings[i];
|
fold := extractFilePath(fProj.getAbsoluteSourceName(i));
|
||||||
if DirectoryExists(fold) then
|
if folds.IndexOf(fold) = -1 then
|
||||||
addImportFolder(fold);
|
folds.Add(fold);
|
||||||
|
end;
|
||||||
|
for i := 0 to fProj.currentConfiguration.pathsOptions.importModulePaths.Count-1 do
|
||||||
|
begin
|
||||||
|
fold := fProj.currentConfiguration.pathsOptions.importModulePaths.Strings[i];
|
||||||
|
if DirectoryExists(fold) and (folds.IndexOf(fold) = -1) then
|
||||||
|
folds.Add(fold);
|
||||||
|
end;
|
||||||
|
for fold in folds do addImportFolder(fold);
|
||||||
|
finally
|
||||||
|
folds.Free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue