diff --git a/CreamInstaller/Forms/MainForm.cs b/CreamInstaller/Forms/MainForm.cs index 2988726..ead4c9b 100644 --- a/CreamInstaller/Forms/MainForm.cs +++ b/CreamInstaller/Forms/MainForm.cs @@ -1660,7 +1660,17 @@ internal sealed partial class MainForm : CustomForm private void programsGroupBox_Enter(object sender, EventArgs e) { } private void OnSettingsButtonClick(object sender, EventArgs e) - => SettingsForm.Show(this); + { + SettingsForm.Show(this); + if (ProgramData.CacheCleared) + { + ProgramData.CacheCleared = false; + selectionTreeView.Nodes.Clear(); + Selection.All.Clear(); + programsToScan = null; + OnLoad(forceProvideChoices: true); + } + } protected override void OnShown(EventArgs e) { diff --git a/CreamInstaller/Forms/SettingsForm.cs b/CreamInstaller/Forms/SettingsForm.cs index 0031c99..7fcf39d 100644 --- a/CreamInstaller/Forms/SettingsForm.cs +++ b/CreamInstaller/Forms/SettingsForm.cs @@ -89,7 +89,9 @@ internal sealed partial class SettingsForm : CustomForm } } + ProgramData.CacheCleared = true; ProgramData.SaveSettings(Program.AppSettings); + DialogResult = DialogResult.OK; } private async void OnReconfigureSteamCMDClick(object sender, EventArgs e) diff --git a/CreamInstaller/Utility/ProgramData.cs b/CreamInstaller/Utility/ProgramData.cs index 826ae1e..7cb0b47 100644 --- a/CreamInstaller/Utility/ProgramData.cs +++ b/CreamInstaller/Utility/ProgramData.cs @@ -81,6 +81,8 @@ internal static class ProgramData private static readonly string InstalledGamesPath = CachePath + @"\installed.json"; private static readonly string SettingsPath = CachePath + @"\settings.json"; + internal static bool CacheCleared { get; set; } + internal static readonly string LogsPath = DirectoryPath + @"\Logs"; internal static readonly string ScanLogPath = LogsPath + @"\game-scan.log"; internal static readonly string SteamLogPath = LogsPath + @"\cream-steam.log";