From 71ff4c6286f295cd6d11b50b06160a5343eb2151 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 10 Apr 2015 13:57:20 +0200 Subject: [PATCH] Fix for missing LastSaveWithVersion, this is needed to recognize with what version the configuration was stored. [skip ci] --- GreenshotPlugin/Core/CoreConfiguration.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/GreenshotPlugin/Core/CoreConfiguration.cs b/GreenshotPlugin/Core/CoreConfiguration.cs index dff34dda4..60f2021ee 100644 --- a/GreenshotPlugin/Core/CoreConfiguration.cs +++ b/GreenshotPlugin/Core/CoreConfiguration.cs @@ -407,6 +407,17 @@ namespace GreenshotPlugin.Core { return base.PreCheckValue(propertyName, propertyValue); } + /// + /// This method will be called before writing the configuration + /// + public override void BeforeSave() { + try { + // Store version, this can be used later to fix settings after an update + LastSaveWithVersion = Assembly.GetEntryAssembly().GetName().Version.ToString(); + } catch { + } + } + /// /// This method will be called after reading the configuration, so eventually some corrections can be made ///