diff --git a/YAMDCC.ConfigEditor/MainWindow.cs b/YAMDCC.ConfigEditor/MainWindow.cs index f9112f4..0037824 100644 --- a/YAMDCC.ConfigEditor/MainWindow.cs +++ b/YAMDCC.ConfigEditor/MainWindow.cs @@ -351,6 +351,8 @@ private void tsiSaveConf_Click(object sender, EventArgs e) if (sfd.ShowDialog() == DialogResult.OK) { + Config.ChargeLimitConf.CurVal = (byte)(chkChgLim.Checked + ? numChgLim.Value : 0); Config.Save(sfd.FileName); SetLastConfPath(sfd.FileName); btnRevert.Enabled = tsiRevert.Enabled = false; @@ -699,7 +701,6 @@ private void numChgLim_Changed(object sender, EventArgs e) { if (Config is not null) { - Config.ChargeLimitConf.CurVal = (byte)numChgLim.Value; btnRevert.Enabled = tsiRevert.Enabled = true; } } @@ -895,6 +896,8 @@ private void LoadConf(YAMDCC_Config config) private void ApplyConf() { // Save the updated config + Config.ChargeLimitConf.CurVal = (byte)(chkChgLim.Checked + ? numChgLim.Value : 0); Config.Save(Paths.CurrentConfig); // Tell the service to reload and apply the updated config