From e9d8f271a2b5f468498853747e954464a668fe92 Mon Sep 17 00:00:00 2001 From: JustArchi Date: Tue, 12 Apr 2016 18:42:16 +0200 Subject: [PATCH] Fix collections not triggering save --- ConfigGenerator/EnhancedPropertyGrid.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ConfigGenerator/EnhancedPropertyGrid.cs b/ConfigGenerator/EnhancedPropertyGrid.cs index 91a799198..3fae90b11 100644 --- a/ConfigGenerator/EnhancedPropertyGrid.cs +++ b/ConfigGenerator/EnhancedPropertyGrid.cs @@ -22,6 +22,7 @@ */ +using System; using System.Windows.Forms; namespace ConfigGenerator { @@ -68,5 +69,14 @@ namespace ConfigGenerator { } } } + + protected override void OnGotFocus(EventArgs e) { + if (e == null) { + return; + } + + base.OnGotFocus(e); + ASFConfig.Save(); + } } }