mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 17:40:26 +02:00
IDE: new project: ask to save changed project: nicer buttons
git-svn-id: trunk@31249 -
This commit is contained in:
parent
1fc6a30b76
commit
27d1183df6
13
ide/main.pp
13
ide/main.pp
@ -10413,19 +10413,17 @@ begin
|
||||
Result:=ProjectDesc.InitDescriptor;
|
||||
if Result<>mrOk then exit;
|
||||
|
||||
// invalidate cached substituted macros
|
||||
IncreaseCompilerParseStamp;
|
||||
|
||||
// close current project first
|
||||
If Project1<>nil then begin
|
||||
if SomethingOfProjectIsModified then begin
|
||||
Result:=MessageDlg(lisProjectChanged, Format(lisSaveChangesToProject,
|
||||
Result:=IDEQuestionDialog(lisProjectChanged, Format(lisSaveChangesToProject,
|
||||
[Project1.GetTitleOrName]),
|
||||
mtconfirmation, [mbYes, mbNo, mbAbort], 0);
|
||||
mtConfirmation, [mrYes, lisHintSave, mrNo, lisDiscardChanges, mrAbort,
|
||||
dlgCancel]);
|
||||
if Result=mrYes then begin
|
||||
Result:=DoSaveProject([]);
|
||||
if Result=mrAbort then exit;
|
||||
end else if Result in [mrCancel,mrAbort] then
|
||||
end else if Result<>mrNo then
|
||||
exit;
|
||||
end;
|
||||
Result:=DoCloseProject;
|
||||
@ -10434,6 +10432,9 @@ begin
|
||||
|
||||
// create a virtual project (i.e. unsaved and without real project directory)
|
||||
|
||||
// invalidate cached substituted macros
|
||||
IncreaseCompilerParseStamp;
|
||||
|
||||
// switch codetools to virtual project directory
|
||||
CodeToolBoss.GlobalValues.Variables[ExternalMacroStart+'ProjPath']:=
|
||||
VirtualDirectory;
|
||||
|
Loading…
Reference in New Issue
Block a user