create new binding for memory arg var

https://projectpokemon.org/home/forums/topic/45331-textvar/

possibly shares a reference thus causing it to be shared.
Thanks Davil!
This commit is contained in:
Kurt 2018-05-21 15:43:07 -07:00
parent 51a878d6a9
commit 6004886a56

View file

@ -212,7 +212,7 @@ namespace PKHeX.WinForms
{
CB_CTVar.DisplayMember = nameof(ComboItem.Text);
CB_CTVar.ValueMember = nameof(ComboItem.Value);
CB_CTVar.DataSource = argvals;
CB_CTVar.DataSource = new BindingSource(argvals, null);
if (index >= 0)
LCTV.Text = vartypes[index];
LCTV.Visible = CB_CTVar.Visible = CB_CTVar.Enabled = argvals.Count > 1;
@ -221,7 +221,7 @@ namespace PKHeX.WinForms
{
CB_OTVar.DisplayMember = nameof(ComboItem.Text);
CB_OTVar.ValueMember = nameof(ComboItem.Value);
CB_OTVar.DataSource = argvals;
CB_OTVar.DataSource = new BindingSource(argvals, null);
if (index >= 0)
LOTV.Text = vartypes[index];
LOTV.Visible = CB_OTVar.Visible = CB_OTVar.Enabled = argvals.Count > 1;