mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-23 12:33:06 +00:00
Reset cp/size on species/form change
This commit is contained in:
parent
c268d5ad05
commit
16e51a81ff
2 changed files with 11 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue