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();
|
Stats.UpdateStats();
|
||||||
SetAbilityList();
|
SetAbilityList();
|
||||||
|
if (pkm is PB7)
|
||||||
|
SizeCP.TryResetStats();
|
||||||
|
|
||||||
// Gender Forms
|
// Gender Forms
|
||||||
if (WinFormsUtil.GetIndex(CB_Species) == 201 && FieldsLoaded)
|
if (WinFormsUtil.GetIndex(CB_Species) == 201 && FieldsLoaded)
|
||||||
|
@ -1111,6 +1113,10 @@ namespace PKHeX.WinForms.Controls
|
||||||
if (!CHK_Nicknamed.Checked)
|
if (!CHK_Nicknamed.Checked)
|
||||||
UpdateNickname(sender, e);
|
UpdateNickname(sender, e);
|
||||||
|
|
||||||
|
// Refresh more derived stats
|
||||||
|
if (pkm is PB7)
|
||||||
|
SizeCP.TryResetStats();
|
||||||
|
|
||||||
UpdateLegality();
|
UpdateLegality();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -15,10 +15,14 @@ namespace PKHeX.WinForms.Controls
|
||||||
pkm = pk as PB7;
|
pkm = pk as PB7;
|
||||||
if (pkm == null)
|
if (pkm == null)
|
||||||
return;
|
return;
|
||||||
|
TryResetStats();
|
||||||
|
LoadStoredValues();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TryResetStats()
|
||||||
|
{
|
||||||
if (CHK_Auto.Checked)
|
if (CHK_Auto.Checked)
|
||||||
pkm.ResetCalculatedValues();
|
pkm.ResetCalculatedValues();
|
||||||
LoadStoredValues();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void LoadStoredValues()
|
private void LoadStoredValues()
|
||||||
|
|
Loading…
Reference in a new issue