Skip to content

Commit 412b24c

Browse files
committed
1.7.3 Settings fix
Settings won't be created with loading has failed
1 parent 5201fa9 commit 412b24c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Source/HDRProfile/Globals.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public class Globals : BaseViewModel
2626
public UserAppSettings Settings { get => _settings; set { _settings = value; OnPropertyChanged(); } }
2727
private bool _settingsLoadedOnce = false;
2828

29-
public void SaveSettings()
29+
public void SaveSettings(bool force = false)
3030
{
31-
if (!_settingsLoadedOnce)
31+
if (!force && _settingsLoadedOnce)
3232
return;
3333
Tools.Logs.Add("Saving settings..", false);
3434
try
@@ -87,7 +87,7 @@ public void LoadSettings()
8787
Tools.Logs.Add("Failed to load settings", false);
8888
Tools.Logs.AddException(ex);
8989
Settings = new UserAppSettings();
90-
SaveSettings();
90+
SaveSettings(true);
9191
Tools.Logs.Add("Created new settings file", false);
9292
}
9393
Logs.LoggingEnabled = Settings.Logging;

0 commit comments

Comments
 (0)