LazUtils: XmlConfig, fix saving default (delete) for enum values

This commit is contained in:
Martin 2024-03-11 21:23:38 +01:00
parent b1847337ca
commit 7fc68aa656

View File

@ -623,7 +623,7 @@ procedure TXMLConfig.SetDeleteValue(const APath: String; const AValue,
DefValue; const APTypeInfo: PTypeInfo);
begin
if CompareMem(@AValue, @DefValue, SizeOfTypeInfo(APTypeInfo)) then
DeletePath(APath)
DeleteValue(APath)
else
SetValue(APath, ValueWithTypeInfoToString(AValue, APTypeInfo));
end;
@ -641,7 +641,7 @@ begin
else t := False;
end;
if t then
DeletePath(APath)
DeleteValue(APath)
else
SetValue(APath, AValue, APTypeInfo);
end;