mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 10:39:09 +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
|
// free sources
|
||||||
if (ActiveUnitInfo.Source<>nil) then begin
|
if (ActiveUnitInfo.Source<>nil) then begin
|
||||||
ActiveUnitInfo.Source.IsDeleted:=true;
|
|
||||||
if (Project1.MainUnitInfo=ActiveUnitInfo)
|
if (Project1.MainUnitInfo=ActiveUnitInfo)
|
||||||
and (not (cfProjectClosing in Flags)) then begin
|
and (not (cfProjectClosing in Flags)) then begin
|
||||||
// lpr file closed in editor, but project kept open -> revert lpr file
|
// lpr file closed in editor, but project kept open -> revert lpr file
|
||||||
Project1.MainUnitInfo.Source.Revert;
|
Project1.MainUnitInfo.Revert;
|
||||||
end;
|
end else
|
||||||
|
ActiveUnitInfo.Source.IsDeleted:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// close form soft (keep it if used by another component)
|
// close form soft (keep it if used by another component)
|
||||||
|
Loading…
Reference in New Issue
Block a user