From a6935012c39dac806c14b2ace09be4d4c20dd42d Mon Sep 17 00:00:00 2001 From: RKrom Date: Mon, 14 May 2012 15:14:40 +0000 Subject: [PATCH] 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 --- GreenshotPlugin/IniFile/IniValue.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/GreenshotPlugin/IniFile/IniValue.cs b/GreenshotPlugin/IniFile/IniValue.cs index 13519b94b..7f38c9a46 100644 --- a/GreenshotPlugin/IniFile/IniValue.cs +++ b/GreenshotPlugin/IniFile/IniValue.cs @@ -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; + } } ///