Set roamer data back on save

existing code cloned the savedata reference to a new array, and didn't
copy back

the Roamer3 reader/writer does all the r/w, and writing only happens
with the setter when the form is called to Save.

Thanks TheRealAlphA!
This commit is contained in:
Kurt 2017-10-22 17:17:17 -07:00
parent 44c80bd722
commit cd16a7721b

View file

@ -7,20 +7,17 @@ namespace PKHeX.WinForms
{
public partial class SAV_Roamer3 : Form
{
private readonly SaveFile Origin;
private readonly SAV3 SAV;
private readonly Roamer3 Reader;
public SAV_Roamer3(SaveFile sav)
{
SAV = (SAV3)(Origin = sav).Clone();
Reader = new Roamer3(SAV);
Reader = new Roamer3((SAV3)sav);
InitializeComponent();
WinFormsUtil.TranslateInterface(this, Main.CurrentLanguage);
CB_Species.DisplayMember = "Text";
CB_Species.ValueMember = "Value";
CB_Species.DataSource = new BindingSource(GameInfo.SpeciesDataSource.Where(id => id.Value <= SAV.MaxSpeciesID).ToList(), null);
CB_Species.DataSource = new BindingSource(GameInfo.SpeciesDataSource.Where(id => id.Value <= sav.MaxSpeciesID).ToList(), null);
LoadData();
}