mirror of https://gitlab.com/basile.b/dexed.git
menu, add source to project, emit hint when proj kind is dub
This commit is contained in:
parent
4c23566a61
commit
e1e86c258f
|
@ -1425,14 +1425,18 @@ end;
|
||||||
|
|
||||||
procedure TCEMainForm.actFileAddToProjExecute(Sender: TObject);
|
procedure TCEMainForm.actFileAddToProjExecute(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
//TODO-cDUB: update 'add file to project' for a DUB project
|
|
||||||
if fDoc = nil then exit;
|
if fDoc = nil then exit;
|
||||||
if fDoc.isProjectSource then exit;
|
if fDoc.isProjectSource then exit; // TODO: rename this abiguous property name to 'isProjectFile'
|
||||||
if fNativeProject = nil then exit;
|
if fProjectInterface = nil then exit;
|
||||||
//
|
//
|
||||||
if fileExists(fDoc.fileName) and (not fDoc.isTemporary) then
|
if fProjectInterface.getFormat = pfNative then
|
||||||
fNativeProject.addSource(fDoc.fileName)
|
begin
|
||||||
else dlgOkInfo('the file has not been added to the project because it does not exist');
|
if fileExists(fDoc.fileName) and (not fDoc.isTemporary) then
|
||||||
|
fNativeProject.addSource(fDoc.fileName)
|
||||||
|
else dlgOkInfo('the file has not been added to the project because it does not exist');
|
||||||
|
end else
|
||||||
|
getMessageDisplay.message('use the DUB project editor to add a source to a DUB project',
|
||||||
|
nil, amcApp, amkHint);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCEMainForm.actFileCloseExecute(Sender: TObject);
|
procedure TCEMainForm.actFileCloseExecute(Sender: TObject);
|
||||||
|
|
Loading…
Reference in New Issue