save after warn, dont save temp modules

This commit is contained in:
Basile Burg 2018-01-17 04:11:39 +01:00
parent caa3618be7
commit 14a65f65be
1 changed files with 6 additions and 3 deletions

View File

@ -1932,7 +1932,7 @@ begin
begin begin
d := fMultidoc.getDocument(i); d := fMultidoc.getDocument(i);
d.disableFileDateCheck := true; d.disableFileDateCheck := true;
if d.modified or (d.fileName = d.tempFilename) then if d.modified or d.isTemporary then
begin begin
f += #9 + shortenPath(d.filename) + LineEnding; f += #9 + shortenPath(d.filename) + LineEnding;
c := true; c := true;
@ -1993,8 +1993,11 @@ begin
else if ModalResult = mrAll then else if ModalResult = mrAll then
begin begin
for i := 0 to fMultidoc.documentCount-1 do for i := 0 to fMultidoc.documentCount-1 do
if fMultidoc.document[i].modified then begin
fMultidoc.document[i].save; d := fMultidoc.document[i];
if d.modified and not d.isTemporary then
d.save;
end;
if assigned(fProject) and fProject.modified then if assigned(fProject) and fProject.modified then
fProject.saveToFile(fProject.filename); fProject.saveToFile(fProject.filename);
for i := 0 to fProjectGroup.projectCount-1 do for i := 0 to fProjectGroup.projectCount-1 do