From 61013b8f1878cfb267f5ffe3ffda841be1db8fd0 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sun, 12 Aug 2018 19:28:35 -0700 Subject: [PATCH] Simplify drop/set into party would reset the battle box sprites legality to not shown; also, the prior fix for #2069 did not work for reloaded save files since GetSlotFiller was called instead. --- .../Controls/SAV Editor/SAVEditor.cs | 23 ++----------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs index 8342e8c4a..ba939c561 100644 --- a/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs +++ b/PKHeX.WinForms/Controls/SAV Editor/SAVEditor.cs @@ -267,26 +267,7 @@ private void ResetDaycare() L_DaycareSeed.Visible = TB_RNGSeed.Visible = seed != null; } - public void SetParty() - { - // Refresh slots - if (SAV.HasParty) - { - var party = SAV.PartyData; - for (int i = 0; i < party.Count; i++) - SlotPictureBoxes[i + (int)SlotIndex.Party].Image = GetSprite(party[i], -1); // i + (int)SlotIndex.Party); -- dont get sprite with "slot", implies in Box - for (int i = party.Count; i < 6; i++) - SlotPictureBoxes[i + (int)SlotIndex.Party].Image = null; - } - if (SAV.HasBattleBox) - { - var battle = SAV.BattleBoxData; - for (int i = 0; i < battle.Count; i++) - SlotPictureBoxes[i + (int)SlotIndex.BattleBox].Image = GetSprite(battle[i], -1); // , i + (int)SlotIndex.BattleBox); -- dont get sprite with "slot", implies in Box - for (int i = battle.Count; i < 6; i++) - SlotPictureBoxes[i + (int)SlotIndex.BattleBox].Image = null; - } - } + public void SetParty() => ResetParty(); public void ClickUndo() { @@ -404,7 +385,7 @@ private void GetSlotFiller(int offset, PictureBox pb) } int slot = GetSlot(pb); - pb.Image = GetSprite(p, slot); + pb.Image = GetSprite(p, slot < 6 ? -1 : slot); pb.BackColor = Color.Transparent; }