mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-08 06:18:21 +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;
|
||||
begin
|
||||
Result:=IsVirtual or Modified or IsChangedOnDisk(CheckLFM);
|
||||
//DebugLn(['TUnitInfo.NeedsSaveToDisk ',filename,' Result=',Result,' Modified=',Modified]);
|
||||
if Result then Exit;
|
||||
if Source<>nil then
|
||||
Result:=Source.ChangeStep<>fSourceChangeStep;
|
||||
// Modified has a test for Source.ChangeStep<>fSourceChangeStep.
|
||||
Result:=IsVirtual or Modified or IsChangedOnDisk(CheckLFM and FilenameIsPascalSource(Filename));
|
||||
//DebugLn(['TUnitInfo.NeedsSaveToDisk ',Filename,' Result=',Result,' Modified=',Modified]);
|
||||
end;
|
||||
|
||||
procedure TUnitInfo.UpdateUsageCount(Min, IfBelowThis, IncIfBelow: extended);
|
||||
|
Loading…
Reference in New Issue
Block a user