From ae2d13432b636ce304f36c4f26be5c7d30998070 Mon Sep 17 00:00:00 2001 From: Kurt Date: Sat, 17 Dec 2022 13:04:37 -0800 Subject: [PATCH] Aggressively hide formarg label on format change --- PKHeX.WinForms/Controls/PKM Editor/LoadSave.cs | 3 +-- PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs | 5 +++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/PKHeX.WinForms/Controls/PKM Editor/LoadSave.cs b/PKHeX.WinForms/Controls/PKM Editor/LoadSave.cs index f0d1b81db..08d5c45f6 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/LoadSave.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/LoadSave.cs @@ -198,8 +198,7 @@ private void LoadMisc2(PKM pk) CHK_IsEgg.Checked = pk.IsEgg; CB_HeldItem.SelectedValue = pk.HeldItem; LoadClamp(CB_Form, pk.Form); - if (pk is IFormArgument f) - L_FormArgument.Visible = FA_Form.LoadArgument(f, pk.Species, pk.Form, pk.Format); + L_FormArgument.Visible = pk is IFormArgument f && FA_Form.LoadArgument(f, pk.Species, pk.Form, pk.Format); ReloadToFriendshipTextBox(pk); diff --git a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs index 7a98d2b51..3d79be8f0 100644 --- a/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs +++ b/PKHeX.WinForms/Controls/PKM Editor/PKMEditor.cs @@ -983,7 +983,10 @@ private void UpdateForm(object sender, EventArgs e) private void RefreshFormArguments() { if (Entity is not IFormArgument f) + { + L_FormArgument.Visible = false; return; + } if (FieldsLoaded) FA_Form.SaveArgument(f); @@ -1841,6 +1844,8 @@ private void ToggleInterface(PKM t) L_AlphaMastered.Visible = CB_AlphaMastered.Visible = t is PA8; FLP_ObedienceLevel.Visible = t is IObedienceLevel; Contest.ToggleInterface(Entity, Entity.Context); + if (t is not IFormArgument) + L_FormArgument.Visible = false; ToggleInterface(Entity.Format); }