From 0dcd5b22e871df27e5a7686bb98508e86f018dc6 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Thu, 18 Aug 2016 18:10:22 -0700 Subject: [PATCH] Fix updateLegality on sav load Legality indication disappeared when save was loading, just defer all checks to the updateLegality method --- PKHeX/MainWindow/Main.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/PKHeX/MainWindow/Main.cs b/PKHeX/MainWindow/Main.cs index c3f70142a..a11230f35 100644 --- a/PKHeX/MainWindow/Main.cs +++ b/PKHeX/MainWindow/Main.cs @@ -821,7 +821,6 @@ namespace PKHeX PB_Legal.Visible = PB_WarnMove1.Visible = PB_WarnMove2.Visible = PB_WarnMove3.Visible = PB_WarnMove4.Visible = SAV.Generation >= 6; PB_MarkPentagon.Visible = SAV.Generation == 6; - PB_Legal.Visible = PB_WarnMove1.Visible = PB_WarnMove2.Visible = PB_WarnMove3.Visible = PB_WarnMove4.Visible = SAV.Generation == 6; TB_GameSync.Visible = TB_Secure1.Visible = TB_Secure2.Visible = L_GameSync.Visible = L_Secure1.Visible = L_Secure2.Visible = SAV.Exportable && SAV.Generation == 6; CB_Form.Visible = Label_Form.Visible = CHK_AsEgg.Visible = GB_EggConditions.Visible = @@ -876,7 +875,6 @@ namespace PKHeX // Common HaX Interface CHK_HackedStats.Enabled = CHK_HackedStats.Visible = MT_Level.Enabled = MT_Level.Visible = MT_Form.Enabled = MT_Form.Visible = HaX; - PB_Legal.Visible = PB_WarnMove1.Visible = PB_WarnMove2.Visible = PB_WarnMove3.Visible = PB_WarnMove4.Visible &= !HaX; TB_Level.Visible = !HaX; // Load Extra Byte List @@ -2272,13 +2270,13 @@ namespace PKHeX return; Legality = la ?? new LegalityAnalysis((PK6) pkm); PB_Legal.Image = Legality.Valid ? Properties.Resources.valid : Properties.Resources.warn; - PB_Legal.Visible = pkm.Gen6 /*&& pkm is PK6*/; + PB_Legal.Visible = pkm.Gen6 /*&& pkm is PK6*/ && !HaX; // Refresh Move Legality for (int i = 0; i < 4; i++) - movePB[i].Visible = !Legality.vMoves[i].Valid; + movePB[i].Visible = !Legality.vMoves[i].Valid && !HaX; for (int i = 0; i < 4; i++) - relearnPB[i].Visible = !Legality.vRelearn[i].Valid; + relearnPB[i].Visible = !Legality.vRelearn[i].Valid && !HaX; } private void updateStats() {