openfile, allow to add several files from dialog

This commit is contained in:
Basile Burg 2016-07-07 07:14:58 +02:00
parent 18233aa775
commit 29f264cb18
1 changed files with 7 additions and 1 deletions

View File

@ -1849,12 +1849,18 @@ begin
end;
procedure TCEMainForm.actFileOpenExecute(Sender: TObject);
var
fname: string;
begin
with TOpenDialog.Create(nil) do
try
if fDoc.isNotNil and not fDoc.isTemporary then
initialDir := fDoc.fileName.extractFileDir;
options := [ofAllowMultiSelect, ofEnableSizing];
filter := DdiagFilter;
if execute then
openFile(filename);
for fname in files do
openFile(fname);
finally
free;
end;