From a0c09b7d6aff207c55ba98d873114aa9bdce4343 Mon Sep 17 00:00:00 2001 From: RKrom Date: Wed, 18 Apr 2012 08:15:22 +0000 Subject: [PATCH] Fixed auto-storing hot key settings, during the display the wrong method was used ("Text = " instead of SetHotkey) git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1789 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4 --- GreenshotPlugin/Controls/GreenshotForm.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GreenshotPlugin/Controls/GreenshotForm.cs b/GreenshotPlugin/Controls/GreenshotForm.cs index a1df47fce..38fadd21b 100644 --- a/GreenshotPlugin/Controls/GreenshotForm.cs +++ b/GreenshotPlugin/Controls/GreenshotForm.cs @@ -266,6 +266,12 @@ namespace GreenshotPlugin.Controls { if (typeof(CheckBox).IsAssignableFrom(field.FieldType)) { CheckBox checkBox = controlObject as CheckBox; checkBox.Checked = (bool)section.Values[configBindable.PropertyName].Value; + } else if (typeof(HotkeyControl).IsAssignableFrom(field.FieldType)) { + HotkeyControl hotkeyControl = controlObject as HotkeyControl; + string hotkeyValue = (string)section.Values[configBindable.PropertyName].Value; + if (!string.IsNullOrEmpty(hotkeyValue)) { + hotkeyControl.SetHotkey(hotkeyValue); + } } else if (typeof(TextBox).IsAssignableFrom(field.FieldType)) { TextBox textBox = controlObject as TextBox; textBox.Text = (string)section.Values[configBindable.PropertyName].Value;