diff --git a/GreenshotPlugin/IniFile/IniConfig.cs b/GreenshotPlugin/IniFile/IniConfig.cs index ba648bda3..a4ed1da22 100644 --- a/GreenshotPlugin/IniFile/IniConfig.cs +++ b/GreenshotPlugin/IniFile/IniConfig.cs @@ -40,6 +40,7 @@ namespace Greenshot.IniFile { private static Dictionary sectionMap = new Dictionary(); private static Dictionary> sections = new Dictionary>(); private static Dictionary> fixedProperties = null; + public static event FileSystemEventHandler IniChanged; private static bool portableCheckMade = false; diff --git a/GreenshotPlugin/IniFile/IniSection.cs b/GreenshotPlugin/IniFile/IniSection.cs index 91082a578..19eea9a0e 100644 --- a/GreenshotPlugin/IniFile/IniSection.cs +++ b/GreenshotPlugin/IniFile/IniSection.cs @@ -121,8 +121,8 @@ namespace Greenshot.IniFile { // Iterate over the members and create IniValueContainers foreach (FieldInfo fieldInfo in iniSectionType.GetFields()) { if (Attribute.IsDefined(fieldInfo, typeof(IniPropertyAttribute))) { - if (!Values.ContainsKey(fieldInfo.Name)) { - IniPropertyAttribute iniPropertyAttribute = (IniPropertyAttribute)fieldInfo.GetCustomAttributes(typeof(IniPropertyAttribute), false)[0]; + IniPropertyAttribute iniPropertyAttribute = (IniPropertyAttribute)fieldInfo.GetCustomAttributes(typeof(IniPropertyAttribute), false)[0]; + if (!Values.ContainsKey(iniPropertyAttribute.Name)) { Values.Add(iniPropertyAttribute.Name, new IniValue(this, fieldInfo, iniPropertyAttribute)); } }