mirror of
https://github.com/greenshot/greenshot
synced 2025-07-15 09:33:46 -07:00
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:
parent
b7cd728697
commit
a6935012c3
1 changed files with 7 additions and 4 deletions
|
@ -314,10 +314,7 @@ namespace Greenshot.IniFile {
|
||||||
Value = defaultValueFromConfig;
|
Value = defaultValueFromConfig;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} if (defaultValueFromConfig != null) {
|
} else if (propertyValue != null) {
|
||||||
Value = defaultValueFromConfig;
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
if (valueType.IsGenericType && valueType.GetGenericTypeDefinition().Equals(typeof(Nullable<>))) {
|
if (valueType.IsGenericType && valueType.GetGenericTypeDefinition().Equals(typeof(Nullable<>))) {
|
||||||
// We are dealing with a generic type that is nullable
|
// We are dealing with a generic type that is nullable
|
||||||
valueType = Nullable.GetUnderlyingType(valueType);
|
valueType = Nullable.GetUnderlyingType(valueType);
|
||||||
|
@ -340,6 +337,12 @@ namespace Greenshot.IniFile {
|
||||||
Value = newValue;
|
Value = newValue;
|
||||||
return;
|
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>
|
/// <summary>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue