ce projects, multi sel file in inspector

This commit is contained in:
Basile Burg 2016-09-09 01:34:02 +02:00
parent dd60df8b7e
commit 0152510c4e
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
3 changed files with 7 additions and 6 deletions

View File

@ -2187,7 +2187,7 @@ begin
try
if fDoc.isNotNil and not fDoc.isTemporary then
initialDir := fDoc.fileName.extractFileDir;
options := [ofAllowMultiSelect, ofEnableSizing];
options := options + [ofAllowMultiSelect];
filter := DdiagFilter;
if execute then
for fname in files do
@ -3403,9 +3403,6 @@ begin
fFreeProj := nil;
end;
// TODO-cFileOpenDialog: allow multi selection when possible
//(open file, add file to project, ...)
// TODO-cprojectsgroup: add a "out of mem" protection in async mode.
procedure TCEMainForm.compileGroup(async: TAsynWait);

View File

@ -527,7 +527,7 @@ var
begin
with TOpenDialog.Create(nil) do
try
Options:= [ofAllowMultiSelect, ofEnableSizing];
Options:= Options + [ofAllowMultiSelect];
if not execute then
exit;
for fname in Files do

View File

@ -288,11 +288,14 @@ begin
end;
procedure TCEProjectInspectWidget.btnAddFileClick(Sender: TObject);
var
fname: string;
begin
if fProject.isNil then exit;
//
with TOpenDialog.Create(nil) do
try
options := options + [ofAllowMultiSelect];
if fLastFileOrFolder.fileExists then
InitialDir := fLastFileOrFolder.extractFilePath
else if fLastFileOrFolder.dirExists then
@ -301,7 +304,8 @@ begin
if execute then
begin
fProject.beginUpdate;
fProject.addSource(filename);
for fname in Files do
fProject.addSource(fname);
fProject.endUpdate;
end;
finally