Fix init of custom work value, fix write of named workval

Closes #3357
This commit is contained in:
Kurt
2022-01-01 23:23:44 -08:00
parent ae70525fd5
commit 0cf7b22363

View File

@@ -52,6 +52,9 @@ public SAV_FlagWork8b(SAV8BS sav)
NUD_System.Text = "0";
CHK_CustomSystem.Checked = obj.GetSystemFlag(0);
NUD_Work.Maximum = obj.CountWork - 1;
CB_CustomWork.SelectedIndex = 0;
Text = $"{Text} ({sav.Version})";
}
@@ -176,7 +179,7 @@ void ChangeConstValue(object? sender, EventArgs e)
return;
updating = true;
var value = (ushort)mtb.Value;
var value = (int)mtb.Value;
var (_, valueID) = map.Find(z => z.Value == value) ?? map[0];
if (WinFormsUtil.GetIndex(cb) != valueID)
cb.SelectedValue = valueID;