mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-10 14:44:24 +00:00
Tweak party undo/redo logic
This commit is contained in:
parent
d9b4a0c771
commit
58f729122e
2 changed files with 3 additions and 2 deletions
|
@ -105,7 +105,7 @@ public sealed class SlotEditor<T>
|
|||
if (!Changelog.CanUndo)
|
||||
return;
|
||||
var slot = Changelog.Undo();
|
||||
NotifySlotChanged(slot, SlotTouchType.Set, slot.Read(SAV));
|
||||
NotifySlotChanged(slot, SlotTouchType.Delete, slot.Read(SAV));
|
||||
}
|
||||
|
||||
public void Redo()
|
||||
|
@ -113,6 +113,6 @@ public sealed class SlotEditor<T>
|
|||
if (!Changelog.CanRedo)
|
||||
return;
|
||||
var slot = Changelog.Redo();
|
||||
NotifySlotChanged(slot, SlotTouchType.Set, slot.Read(SAV));
|
||||
NotifySlotChanged(slot, SlotTouchType.Delete, slot.Read(SAV));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -232,6 +232,7 @@ public abstract class SaveFile : ITrainerInfo, IGameValueLimit, IBoxDetailWallpa
|
|||
int ctr = 0;
|
||||
foreach (var exist in value.Where(pk => pk.Species != 0))
|
||||
SetPartySlot(exist, PartyBuffer, GetPartyOffset(ctr++));
|
||||
PartyCount = ctr;
|
||||
for (int i = ctr; i < 6; i++)
|
||||
SetPartySlot(BlankPKM, PartyBuffer, GetPartyOffset(i));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue