mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-17 01:21:07 +01:00
IDE: fixed closing lpr file in source editor: do not clear changes
git-svn-id: trunk@16765 -
This commit is contained in:
parent
18c474eba2
commit
4277b7bfe8
@ -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.Source.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