mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-05-09 12:35:20 -05:00
Fix entree species change
thanks KR for finding
This commit is contained in:
parent
f444c41ee3
commit
e03e6cb2ff
|
|
@ -578,6 +578,7 @@ private void SaveForest()
|
|||
}
|
||||
|
||||
private IList<EntreeSlot> CurrentSlots;
|
||||
private int currentIndex = -1;
|
||||
|
||||
private void ChangeArea(object sender, EventArgs e)
|
||||
{
|
||||
|
|
@ -586,13 +587,15 @@ private void ChangeArea(object sender, EventArgs e)
|
|||
LB_Slots.Items.Clear();
|
||||
foreach (var z in CurrentSlots.Select(z => GameInfo.Strings.Species[z.Species]))
|
||||
LB_Slots.Items.Add(z);
|
||||
LB_Slots.SelectedIndex = 0;
|
||||
LB_Slots.SelectedIndex = currentIndex = 0;
|
||||
}
|
||||
|
||||
private void ChangeSlot(object sender, EventArgs e)
|
||||
{
|
||||
CurrentSlot = null;
|
||||
var current = CurrentSlots[LB_Slots.SelectedIndex];
|
||||
if (LB_Slots.SelectedIndex >= 0)
|
||||
currentIndex = LB_Slots.SelectedIndex;
|
||||
var current = CurrentSlots[currentIndex];
|
||||
CB_Species.SelectedValue = current.Species;
|
||||
SetForms(current);
|
||||
SetGenders(current);
|
||||
|
|
@ -613,7 +616,7 @@ private void UpdateSlotValue(object sender, EventArgs e)
|
|||
if (sender == CB_Species)
|
||||
{
|
||||
CurrentSlot.Species = WinFormsUtil.GetIndex(CB_Species);
|
||||
LB_Slots.Items[LB_Slots.SelectedIndex] = GameInfo.Strings.Species[CurrentSlot.Species];
|
||||
LB_Slots.Items[currentIndex] = GameInfo.Strings.Species[CurrentSlot.Species];
|
||||
SetForms(CurrentSlot);
|
||||
SetGenders(CurrentSlot);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user