Skip to content

Commit

Permalink
Fixed a bug that prevented the options from beeing saved
Browse files Browse the repository at this point in the history
  • Loading branch information
Irame committed Mar 4, 2023
1 parent b68e732 commit 085561d
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion SmartCmdArgs/SmartCmdArgs.Shared/CmdArgsOptionPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,19 @@ namespace SmartCmdArgs
{
public class CmdArgsOptionPage : DialogPage, INotifyPropertyChanged
{
private bool _dontSave = false;

public CmdArgsOptionPage() : base()
{
ResetSettings();
_dontSave = true;
try
{
ResetSettings();
}
finally
{
_dontSave = false;
}
}

private bool _useMonospaceFont;
Expand Down Expand Up @@ -98,6 +108,14 @@ public bool MacroEvaluationEnabled
set => SetAndNotify(value, ref _macroEvaluationEnabled);
}

public override void SaveSettingsToStorage()
{
if (_dontSave)
return;

base.SaveSettingsToStorage();
}

public override void ResetSettings()
{
base.ResetSettings();
Expand Down

0 comments on commit 085561d

Please sign in to comment.