mirror of https://gitlab.com/basile.b/dexed.git
fix, prevented update burst when adding/removing many sources
This commit is contained in:
parent
6a8bcf083a
commit
75a9d12a57
|
@ -242,6 +242,7 @@ begin
|
|||
else dir := '';
|
||||
if selectDirectory('sources', dir, dir, true, 0) then
|
||||
begin
|
||||
fProject.beginUpdate;
|
||||
lst := TStringList.Create;
|
||||
try
|
||||
listFiles(lst, dir, true);
|
||||
|
@ -254,6 +255,7 @@ begin
|
|||
end;
|
||||
finally
|
||||
lst.Free;
|
||||
fProject.endUpdate;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -274,9 +276,11 @@ begin
|
|||
dir := extractFilePath(fname);
|
||||
if not DirectoryExists(dir) then exit;
|
||||
//
|
||||
fProject.beginUpdate;
|
||||
for i:= fProject.Sources.Count-1 downto 0 do
|
||||
if extractFilePath(fProject.getAbsoluteSourceName(i)) = dir then
|
||||
fProject.Sources.Delete(i);
|
||||
fProject.endUpdate;
|
||||
UpdateByEvent;
|
||||
end;
|
||||
|
||||
|
|
Loading…
Reference in New Issue