Fixed bug #3526374, overlooked an issue with loading the ini file.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1845 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-05-14 15:14:40 +00:00
parent b7cd728697
commit a6935012c3

View file

@ -314,10 +314,7 @@ namespace Greenshot.IniFile {
Value = defaultValueFromConfig;
return;
}
} if (defaultValueFromConfig != null) {
Value = defaultValueFromConfig;
return;
} else {
} else if (propertyValue != null) {
if (valueType.IsGenericType && valueType.GetGenericTypeDefinition().Equals(typeof(Nullable<>))) {
// We are dealing with a generic type that is nullable
valueType = Nullable.GetUnderlyingType(valueType);
@ -340,6 +337,12 @@ namespace Greenshot.IniFile {
Value = newValue;
return;
}
// If nothing is set, we can use the default value from the config (if we habe one)
if (defaultValueFromConfig != null) {
Value = defaultValueFromConfig;
return;
}
}
/// <summary>