diff --git a/src/ce_main.pas b/src/ce_main.pas index 7e75daa4..c9bb9791 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -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); diff --git a/src/ce_projgroup.pas b/src/ce_projgroup.pas index 09ed3a8c..f2505756 100644 --- a/src/ce_projgroup.pas +++ b/src/ce_projgroup.pas @@ -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 diff --git a/src/ce_projinspect.pas b/src/ce_projinspect.pas index 24264eaa..ccc82214 100644 --- a/src/ce_projinspect.pas +++ b/src/ce_projinspect.pas @@ -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