With #321 it as reported that the reload functionality didn't work, there was actually a bug in the code replacing the values.

This commit is contained in:
Robin Krom 2021-10-16 23:07:22 +02:00
commit ce56ee1cb6
No known key found for this signature in database
GPG key ID: BCC01364F1371490

View file

@ -143,7 +143,7 @@ namespace Greenshot.Base.IniFile
IniPropertyAttribute iniPropertyAttribute = (IniPropertyAttribute) fieldInfo.GetCustomAttributes(typeof(IniPropertyAttribute), false)[0];
if (!Values.ContainsKey(iniPropertyAttribute.Name))
{
Values.Add(iniPropertyAttribute.Name, new IniValue(this, fieldInfo, iniPropertyAttribute));
Values[iniPropertyAttribute.Name] = new IniValue(this, fieldInfo, iniPropertyAttribute);
}
}
}
@ -155,7 +155,7 @@ namespace Greenshot.Base.IniFile
if (!Values.ContainsKey(propertyInfo.Name))
{
IniPropertyAttribute iniPropertyAttribute = (IniPropertyAttribute) propertyInfo.GetCustomAttributes(typeof(IniPropertyAttribute), false)[0];
Values.Add(iniPropertyAttribute.Name, new IniValue(this, propertyInfo, iniPropertyAttribute));
Values[iniPropertyAttribute.Name] = new IniValue(this, propertyInfo, iniPropertyAttribute);
}
}
}