mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-27 14:30:56 +00:00
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:
parent
44c80bd722
commit
cd16a7721b
1 changed files with 2 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue