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:
montanon 2026-03-17 15:48:24 -03:00
parent 8b3da88a13
commit efbcde5d54
2 changed files with 2 additions and 2 deletions

View File

@ -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);
}

View File

@ -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();
}