From 10c45e06b9a85b2e29bd997635a9abebffceba8d Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Tue, 27 Sep 2016 22:43:03 -0700 Subject: [PATCH] Fix nickname checked for first pkm loaded Language combobox isn't set, so the nickname detection thinks the 'none' language'd pkm nickname does not match the supplied nickname. Disable this check until fields are loaded. --- PKHeX/MainWindow/Main.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PKHeX/MainWindow/Main.cs b/PKHeX/MainWindow/Main.cs index ba4ece279..44b3cb33d 100644 --- a/PKHeX/MainWindow/Main.cs +++ b/PKHeX/MainWindow/Main.cs @@ -805,8 +805,8 @@ private void openSAV(byte[] input, string path) private void loadSAV(SaveFile sav, string path) { // clean fields - populateFields(SAV.BlankPKM); PKM pk = preparePKM(); + populateFields(SAV.BlankPKM); SAV = sav; if (path != null) // Actual save file @@ -1096,7 +1096,7 @@ private void loadSAV(SaveFile sav, string path) } bool init = fieldsInitialized; fieldsInitialized = fieldsLoaded = false; - pkm = (pkm.Format != SAV.Generation || SAV.Generation < 3) ? SAV.BlankPKM : pk; + pkm = pkm.GetType() != SAV.PKMType ? SAV.BlankPKM : pk; populateFilteredDataSources(); populateFields(pkm); fieldsInitialized |= init; @@ -3297,6 +3297,8 @@ private void updateU64(object sender, EventArgs e) private void updateIsNicknamed(object sender, EventArgs e) { + if (!fieldsLoaded) + return; if (!CHK_Nicknamed.Checked) { int species = Util.getIndex(CB_Species);