Fixed Bug #3553527, had changed a bit of logic for creating the ini-values to work as it supposed to but only changed the dictionary.add and forgot to change the dictionary.contains. This caused a key to be added twice.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1972 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-08-02 19:45:59 +00:00
commit 153b1cd2c9
2 changed files with 3 additions and 2 deletions

View file

@ -40,6 +40,7 @@ namespace Greenshot.IniFile {
private static Dictionary<string, IniSection> sectionMap = new Dictionary<string, IniSection>();
private static Dictionary<string, Dictionary<string, string>> sections = new Dictionary<string, Dictionary<string, string>>();
private static Dictionary<string, Dictionary<string, string>> fixedProperties = null;
public static event FileSystemEventHandler IniChanged;
private static bool portableCheckMade = false;

View file

@ -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];
if (!Values.ContainsKey(iniPropertyAttribute.Name)) {
Values.Add(iniPropertyAttribute.Name, new IniValue(this, fieldInfo, iniPropertyAttribute));
}
}