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 try
if fDoc.isNotNil and not fDoc.isTemporary then if fDoc.isNotNil and not fDoc.isTemporary then
initialDir := fDoc.fileName.extractFileDir; initialDir := fDoc.fileName.extractFileDir;
options := [ofAllowMultiSelect, ofEnableSizing]; options := options + [ofAllowMultiSelect];
filter := DdiagFilter; filter := DdiagFilter;
if execute then if execute then
for fname in files do for fname in files do
@ -3403,9 +3403,6 @@ begin
fFreeProj := nil; fFreeProj := nil;
end; 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. // TODO-cprojectsgroup: add a "out of mem" protection in async mode.
procedure TCEMainForm.compileGroup(async: TAsynWait); procedure TCEMainForm.compileGroup(async: TAsynWait);

View File

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

View File

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