mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 19:01:43 +02:00
IDE: Simplify TUnitInfo.NeedsSaveToDisk and don't check LFM if the unit is an LFM file itself.
This commit is contained in:
parent
138b8f2eae
commit
c539d373e7
@ -2243,11 +2243,9 @@ end;
|
|||||||
|
|
||||||
function TUnitInfo.NeedsSaveToDisk(CheckLFM: boolean): boolean;
|
function TUnitInfo.NeedsSaveToDisk(CheckLFM: boolean): boolean;
|
||||||
begin
|
begin
|
||||||
Result:=IsVirtual or Modified or IsChangedOnDisk(CheckLFM);
|
// Modified has a test for Source.ChangeStep<>fSourceChangeStep.
|
||||||
//DebugLn(['TUnitInfo.NeedsSaveToDisk ',filename,' Result=',Result,' Modified=',Modified]);
|
Result:=IsVirtual or Modified or IsChangedOnDisk(CheckLFM and FilenameIsPascalSource(Filename));
|
||||||
if Result then Exit;
|
//DebugLn(['TUnitInfo.NeedsSaveToDisk ',Filename,' Result=',Result,' Modified=',Modified]);
|
||||||
if Source<>nil then
|
|
||||||
Result:=Source.ChangeStep<>fSourceChangeStep;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TUnitInfo.UpdateUsageCount(Min, IfBelowThis, IncIfBelow: extended);
|
procedure TUnitInfo.UpdateUsageCount(Min, IfBelowThis, IncIfBelow: extended);
|
||||||
|
Loading…
Reference in New Issue
Block a user