mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-19 13:21:46 +02:00
IDE: fixed closing lpr file in source editor: do not clear changes
git-svn-id: trunk@16762 -
This commit is contained in:
parent
9147596e63
commit
f0a7f0e032
@ -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;
|
||||
Project1.MainUnitInfo.Revert;
|
||||
end else
|
||||
ActiveUnitInfo.Source.IsDeleted:=true;
|
||||
end;
|
||||
|
||||
// close form soft (keep it if used by another component)
|
||||
|
Loading…
Reference in New Issue
Block a user