projects group, allow to add several files from dialog

This commit is contained in:
Basile Burg 2016-07-06 06:52:43 +02:00
parent 614f6bdc21
commit 89bf138285
1 changed files with 13 additions and 4 deletions

View File

@ -431,15 +431,24 @@ end;
{$REGION Widget project group things -------------------------------------------}
procedure TCEProjectGroupWidget.BtnAddProjClick(Sender: TObject);
var
fname: string;
added: boolean;
begin
with TOpenDialog.Create(nil) do
try
Options:= [ofAllowMultiSelect, ofEnableSizing];
if not execute then
exit;
if projectGroup.findProject(filename) <> nil then
exit;
projectGroup.addItem(filename);
updateList;
for fname in Files do
begin
if projectGroup.findProject(fname) <> nil then
continue;
projectGroup.addItem(fname);
added := true;
end;
if added then
updateList;
finally
free;
end;