mirror of
https://github.com/kwsch/PKHeX.git
synced 2026-10-02 04:48:57 -05:00
Tweak move bindingsource iteration
Create datasource before the foreach to avoid multiple .Where(), possibly fixing #151
This commit is contained in:
@@ -1060,10 +1060,11 @@ private void populateFilteredDataSources()
|
||||
CB_GameOrigin.DataSource = new BindingSource(VersionDataSource.Where(g => g.Value <= SAV.MaxGameID || SAV.Generation >= 3 && g.Value == 15), null);
|
||||
|
||||
// Set the Move ComboBoxes too..
|
||||
var moves = MoveDataSource.Where(m => m.Value <= SAV.MaxMoveID).ToArray();
|
||||
foreach (ComboBox cb in new[] { CB_Move1, CB_Move2, CB_Move3, CB_Move4, CB_RelearnMove1, CB_RelearnMove2, CB_RelearnMove3, CB_RelearnMove4 })
|
||||
{
|
||||
cb.DisplayMember = "Text"; cb.ValueMember = "Value";
|
||||
cb.DataSource = new BindingSource(MoveDataSource.Where(m => m.Value <= SAV.MaxMoveID), null);
|
||||
cb.DataSource = new BindingSource(moves, null);
|
||||
}
|
||||
}
|
||||
private Action getFieldsfromPKM;
|
||||
|
||||
Reference in New Issue
Block a user