Reset cp/size on species/form change

This commit is contained in:
Kurt 2018-11-17 19:57:53 -08:00
parent c268d5ad05
commit 16e51a81ff
2 changed files with 11 additions and 1 deletions

View file

@ -914,6 +914,8 @@ namespace PKHeX.WinForms.Controls
Stats.UpdateStats();
SetAbilityList();
if (pkm is PB7)
SizeCP.TryResetStats();
// Gender Forms
if (WinFormsUtil.GetIndex(CB_Species) == 201 && FieldsLoaded)
@ -1111,6 +1113,10 @@ namespace PKHeX.WinForms.Controls
if (!CHK_Nicknamed.Checked)
UpdateNickname(sender, e);
// Refresh more derived stats
if (pkm is PB7)
SizeCP.TryResetStats();
UpdateLegality();
}

View file

@ -15,10 +15,14 @@ namespace PKHeX.WinForms.Controls
pkm = pk as PB7;
if (pkm == null)
return;
TryResetStats();
LoadStoredValues();
}
public void TryResetStats()
{
if (CHK_Auto.Checked)
pkm.ResetCalculatedValues();
LoadStoredValues();
}
private void LoadStoredValues()