mirror of https://gitlab.com/basile.b/dexed.git
projects group, allow to add several files from dialog
This commit is contained in:
parent
614f6bdc21
commit
89bf138285
|
@ -431,15 +431,24 @@ end;
|
||||||
|
|
||||||
{$REGION Widget project group things -------------------------------------------}
|
{$REGION Widget project group things -------------------------------------------}
|
||||||
procedure TCEProjectGroupWidget.BtnAddProjClick(Sender: TObject);
|
procedure TCEProjectGroupWidget.BtnAddProjClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
fname: string;
|
||||||
|
added: boolean;
|
||||||
begin
|
begin
|
||||||
with TOpenDialog.Create(nil) do
|
with TOpenDialog.Create(nil) do
|
||||||
try
|
try
|
||||||
|
Options:= [ofAllowMultiSelect, ofEnableSizing];
|
||||||
if not execute then
|
if not execute then
|
||||||
exit;
|
exit;
|
||||||
if projectGroup.findProject(filename) <> nil then
|
for fname in Files do
|
||||||
exit;
|
begin
|
||||||
projectGroup.addItem(filename);
|
if projectGroup.findProject(fname) <> nil then
|
||||||
updateList;
|
continue;
|
||||||
|
projectGroup.addItem(fname);
|
||||||
|
added := true;
|
||||||
|
end;
|
||||||
|
if added then
|
||||||
|
updateList;
|
||||||
finally
|
finally
|
||||||
free;
|
free;
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue