From 743c943363bcd3d00eced56402f2c25afa248f2f Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 21 Dec 2021 20:49:35 -0800 Subject: [PATCH] Fix saving path settings if set from dialog --- CHANGELIST.md | 1 + MPF/ViewModels/OptionsViewModel.cs | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index cd869440..bc2621b8 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -36,6 +36,7 @@ - Refine the "missing disc" text - Overhaul XeMID handling - Fix output dialog issues in Options window +- Fix saving path settings if set from dialog ### 2.1 (2021-07-22) - Enum, no more diff --git a/MPF/ViewModels/OptionsViewModel.cs b/MPF/ViewModels/OptionsViewModel.cs index 06e55e1b..49be6c64 100644 --- a/MPF/ViewModels/OptionsViewModel.cs +++ b/MPF/ViewModels/OptionsViewModel.cs @@ -18,17 +18,17 @@ namespace MPF.GUI.ViewModels /// /// Parent OptionsWindow object /// - public OptionsWindow Parent { get; private set; } + public OptionsWindow Parent { get; } /// /// Current set of options /// - public Options Options { get; private set; } + public Options Options { get; } /// /// Flag for if settings were saved or not /// - public bool SavedSettings { get; private set; } = false; + public bool SavedSettings { get; private set; } #endregion @@ -37,12 +37,12 @@ namespace MPF.GUI.ViewModels /// /// List of available internal programs /// - public List> InternalPrograms { get; private set; } = PopulateInternalPrograms(); + public List> InternalPrograms => PopulateInternalPrograms(); /// /// Current list of supported system profiles /// - public List Systems { get; private set; } = RedumpSystemComboBoxItem.GenerateElements().ToList(); + public List Systems => RedumpSystemComboBoxItem.GenerateElements().ToList(); #endregion @@ -155,6 +155,7 @@ namespace MPF.GUI.ViewModels if (exists) { + Options[pathSettingName] = path; TextBoxForPathSetting(pathSettingName).Text = path; } else