mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-04-25 08:10:48 -05:00
Fix Geonet4/BattlePass4 using origin instead of clone
- Geonet4ViewModel: construct Geonet4 from clone (SAV4), not origin. Geonet.Save() was writing to origin's buffer, then CopyChangesFrom overwrote it with the unmodified clone — all edits silently lost. - BattlePass4ViewModel: initial pass reference from clone (SAV4BR), not origin. Edits to the first-loaded pass were writing to origin's buffer and getting overwritten by CopyChangesFrom on save.
This commit is contained in:
parent
8b3da88a13
commit
efbcde5d54
|
|
@ -79,7 +79,7 @@ public BattlePass4ViewModel(SAV4BR sav, int startIndex = 0) : base(sav)
|
|||
LoadPassList();
|
||||
|
||||
_currentPassIndex = startIndex;
|
||||
_currentPass = sav.BattlePasses[startIndex];
|
||||
_currentPass = SAV4BR.BattlePasses[startIndex];
|
||||
_selectedPassIndex = startIndex;
|
||||
LoadCurrent(_currentPass);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ public Geonet4ViewModel(SAV4 sav) : base(sav)
|
|||
{
|
||||
_origin = sav;
|
||||
SAV4 = (SAV4)sav.Clone();
|
||||
Geonet = new Geonet4(sav);
|
||||
Geonet = new Geonet4(SAV4);
|
||||
_globalFlag = Geonet.GlobalFlag;
|
||||
LoadEntries();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user