mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-11 15:07:11 +00:00
Sanity check listbox formes
SM does not have dex flags for totem forms, but pkhex now provides them in the form dropdown Closes #2068 thanks @iiippppk !
This commit is contained in:
parent
d6f623ecfb
commit
d685fec327
1 changed files with 9 additions and 0 deletions
|
@ -153,6 +153,15 @@ namespace PKHeX.WinForms
|
|||
return false;
|
||||
}
|
||||
|
||||
// sanity check formes -- SM does not have totem form dex bits
|
||||
int count = ds.Count;
|
||||
for (int i = 1; i < ds.Count; i++)
|
||||
{
|
||||
int index = Dex.GetDexFormIndex(bspecies, count, i);
|
||||
if (index < 0)
|
||||
ds.RemoveAt(i); // always last entry, ends early
|
||||
}
|
||||
|
||||
LB_Forms.DataSource = ds;
|
||||
if (fspecies <= SAV.MaxSpeciesID)
|
||||
LB_Forms.SelectedIndex = 0;
|
||||
|
|
Loading…
Reference in a new issue