IDE: open LPI dialog - cancel opening on ESC.

git-svn-id: trunk@54078 -
This commit is contained in:
ondrej 2017-02-03 08:27:50 +00:00
parent 94630704fa
commit 883293a51a

View File

@ -1095,15 +1095,19 @@ begin
// either this is a lazarus project or it is not yet a lazarus project ;)
LPIFilename:=ChangeFileExt(FFilename,'.lpi');
if FileExistsCached(LPIFilename) then begin
if IDEQuestionDialog(lisProjectInfoFileDetected,
case IDEQuestionDialog(lisProjectInfoFileDetected,
Format(lisTheFileSeemsToBeTheProgramFileOfAnExistingLazarusP,
[FFilename]), mtConfirmation,
[mrOk, lisOpenProject2, mrCancel, lisOpenTheFileAsNormalSource])=mrOk then
begin
Result:=MainIDE.DoOpenProjectFile(LPIFilename,[ofAddToRecent]);
if Result = mrOK then
Result := mrIgnore;
exit;
[mrOk, lisOpenProject2, mrAbort, lisOpenTheFileAsNormalSource])
of
mrOk:
begin
Result:=MainIDE.DoOpenProjectFile(LPIFilename,[ofAddToRecent]);
if Result = mrOK then
Result := mrIgnore;
exit;
end;
mrCancel: Exit;
end;
end else begin
AText:=Format(lisTheFileSeemsToBeAProgramCloseCurrentProject,