mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 10:49:16 +02:00
IDE: open LPI dialog - cancel opening on ESC.
git-svn-id: trunk@54078 -
This commit is contained in:
parent
94630704fa
commit
883293a51a
@ -1095,15 +1095,19 @@ begin
|
|||||||
// either this is a lazarus project or it is not yet a lazarus project ;)
|
// either this is a lazarus project or it is not yet a lazarus project ;)
|
||||||
LPIFilename:=ChangeFileExt(FFilename,'.lpi');
|
LPIFilename:=ChangeFileExt(FFilename,'.lpi');
|
||||||
if FileExistsCached(LPIFilename) then begin
|
if FileExistsCached(LPIFilename) then begin
|
||||||
if IDEQuestionDialog(lisProjectInfoFileDetected,
|
case IDEQuestionDialog(lisProjectInfoFileDetected,
|
||||||
Format(lisTheFileSeemsToBeTheProgramFileOfAnExistingLazarusP,
|
Format(lisTheFileSeemsToBeTheProgramFileOfAnExistingLazarusP,
|
||||||
[FFilename]), mtConfirmation,
|
[FFilename]), mtConfirmation,
|
||||||
[mrOk, lisOpenProject2, mrCancel, lisOpenTheFileAsNormalSource])=mrOk then
|
[mrOk, lisOpenProject2, mrAbort, lisOpenTheFileAsNormalSource])
|
||||||
begin
|
of
|
||||||
Result:=MainIDE.DoOpenProjectFile(LPIFilename,[ofAddToRecent]);
|
mrOk:
|
||||||
if Result = mrOK then
|
begin
|
||||||
Result := mrIgnore;
|
Result:=MainIDE.DoOpenProjectFile(LPIFilename,[ofAddToRecent]);
|
||||||
exit;
|
if Result = mrOK then
|
||||||
|
Result := mrIgnore;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
mrCancel: Exit;
|
||||||
end;
|
end;
|
||||||
end else begin
|
end else begin
|
||||||
AText:=Format(lisTheFileSeemsToBeAProgramCloseCurrentProject,
|
AText:=Format(lisTheFileSeemsToBeAProgramCloseCurrentProject,
|
||||||
|
Loading…
Reference in New Issue
Block a user