Fix pkmeditor auto-set Nickname flag

Event was stolen via impossible-chars change, so just revert & call that method so only 1 method is hooked to the event.
This commit is contained in:
Kurt 2024-05-10 19:26:48 -05:00
parent bd4ea9656d
commit 969f733c2c
2 changed files with 3 additions and 2 deletions

View file

@ -633,7 +633,7 @@ namespace PKHeX.WinForms.Controls
TB_Nickname.Name = "TB_Nickname";
TB_Nickname.Size = new System.Drawing.Size(144, 23);
TB_Nickname.TabIndex = 5;
TB_Nickname.TextChanged += RefreshFontWarningButton;
TB_Nickname.TextChanged += UpdateIsNicknamed;
TB_Nickname.MouseDown += UpdateNicknameClick;
//
// BTN_NicknameWarn

View file

@ -1319,12 +1319,13 @@ public sealed partial class PKMEditor : UserControl, IMainEditor
if (!FieldsLoaded)
return;
RefreshFontWarningButton();
Entity.Nickname = TB_Nickname.Text;
if (CHK_NicknamedFlag.Checked)
return;
var species = (ushort)WinFormsUtil.GetIndex(CB_Species);
if (species < 1 || species > Entity.MaxSpeciesID)
if (species is 0 || species > Entity.MaxSpeciesID)
return;
if (CHK_IsEgg.Checked)