D&D, try to open an editor first, then proj then always editor

This commit is contained in:
Basile Burg 2015-10-01 07:05:50 +02:00
parent caf568c934
commit e442c1fea2
1 changed files with 5 additions and 3 deletions

View File

@ -188,7 +188,7 @@ type
procedure actEdUnIndentExecute(Sender: TObject);
procedure ApplicationProperties1Exception(Sender: TObject; E: Exception);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormDropFiles(Sender: TObject; const FileNames: array of String);
procedure FormDropFiles(Sender: TObject; const FileNames: array of string);
private
fDoc: TCESynMemo;
@ -1458,13 +1458,15 @@ begin
saveFile(fMultidoc.document[i]);
end;
procedure TCEMainForm.FormDropFiles(Sender: TObject;const FileNames: array of String);
procedure TCEMainForm.FormDropFiles(Sender: TObject;const FileNames: array of string);
var
fname: string;
begin
for fname in FileNames do
begin
if isValidNativeProject(fname) or isValidDubProject(fname) then
if isEditable(fname) then
openFile(fname)
else if isValidNativeProject(fname) or isValidDubProject(fname) then
begin
openProj(fname);
break;