Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions Settings/UiConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,6 @@ public void Save()
JsonSerializerOptions options = new();
options.WriteIndented = true;
File.WriteAllText(_settingsFile, JsonSerializer.Serialize(Settings, options));
/* FIXME: For some reason unknown to me, App.MainWindow is null here, but only if the Settings were generated before e.g. on first launch
* No biggy in that case as nothing has been customized yet, but depending on the reason this might cause problems.
*/
App.MainWindow.LoadSettings();
}
catch (Exception ex)
{
Expand All @@ -135,6 +131,7 @@ public void Set(string setting, object value)

property.SetValue(Settings, Convert.ChangeType(value, property.PropertyType));
Save();
App.MainWindow.LoadSettings();
}

}
Loading