Remove "None" version from pkmdb/encdb/settings cb

This commit is contained in:
Kurt 2022-11-27 16:13:31 -08:00
parent c64efa4137
commit eab43ad59b
3 changed files with 5 additions and 2 deletions

View file

@ -263,6 +263,7 @@ public partial class SAV_Database : Form
var versions = new List<ComboItem>(GameInfo.VersionDataSource);
versions.Insert(0, comboAny);
versions.RemoveAt(versions.Count - 1); // None
CB_GameOrigin.DataSource = versions;
string[] hptypes = new string[GameInfo.Strings.types.Length - 2];

View file

@ -201,7 +201,9 @@ public partial class SAV_Encounters : Form
}
var DS_Version = new List<ComboItem>(GameInfo.VersionDataSource);
DS_Version.Insert(0, Any); CB_GameOrigin.DataSource = DS_Version;
DS_Version.Insert(0, Any);
DS_Version.RemoveAt(DS_Version.Count - 1);
CB_GameOrigin.DataSource = DS_Version;
// Trigger a Reset
ResetFilters(this, EventArgs.Empty);

View file

@ -18,7 +18,7 @@ public partial class SettingsEditor : Form
if (obj is PKHeXSettings s)
{
var noSelectVersions = new[] {GameVersion.GO};
var noSelectVersions = new[] {GameVersion.GO, (GameVersion)0};
CB_Blank.InitializeBinding();
CB_Blank.DataSource = GameInfo.VersionDataSource.Where(z => !noSelectVersions.Contains((GameVersion)z.Value)).ToList();
CB_Blank.SelectedValue = (int) s.Startup.DefaultSaveVersion;