IDE: fixed closing lpr file in source editor: do not clear changes

git-svn-id: trunk@16765 -
This commit is contained in:
mattias 2008-09-27 10:14:02 +00:00
parent 18c474eba2
commit 4277b7bfe8

View File

@ -7291,12 +7291,12 @@ begin
// free sources
if (ActiveUnitInfo.Source<>nil) then begin
ActiveUnitInfo.Source.IsDeleted:=true;
if (Project1.MainUnitInfo=ActiveUnitInfo)
and (not (cfProjectClosing in Flags)) then begin
// lpr file closed in editor, but project kept open -> revert lpr file
Project1.MainUnitInfo.Source.Revert;
end;
end else
ActiveUnitInfo.Source.IsDeleted:=true;
end;
// close form soft (keep it if used by another component)