Update cp/stats on friendship update

This commit is contained in:
Kurt 2018-11-26 15:42:40 -08:00
parent 105c466ab3
commit 26647996c6
2 changed files with 6 additions and 1 deletions

View file

@ -911,6 +911,11 @@ namespace PKHeX.WinForms.Controls
return; return;
if (Util.ToInt32(tb.Text) > byte.MaxValue) if (Util.ToInt32(tb.Text) > byte.MaxValue)
tb.Text = "255"; tb.Text = "255";
if (sender == TB_Friendship && int.TryParse(TB_Friendship.Text, out var val))
{
pkm.CurrentFriendship = val;
UpdateStats();
}
} }
private void UpdateForm(object sender, EventArgs e) private void UpdateForm(object sender, EventArgs e)

View file

@ -16,13 +16,13 @@ namespace PKHeX.WinForms.Controls
if (pkm == null) if (pkm == null)
return; return;
TryResetStats(); TryResetStats();
LoadStoredValues();
} }
public void TryResetStats() public void TryResetStats()
{ {
if (CHK_Auto.Checked) if (CHK_Auto.Checked)
pkm.ResetCalculatedValues(); pkm.ResetCalculatedValues();
LoadStoredValues();
} }
private void LoadStoredValues() private void LoadStoredValues()