From 7269c97699ae90b11b5bbd5d56f4c406ac242cd0 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Thu, 17 Mar 2016 18:58:30 -0700 Subject: [PATCH] Minor tweaks Update legality on showdown export Update all legality on legality analysis triggered (PB_Legal or contextmenu) --- PKX/f1-Main.cs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/PKX/f1-Main.cs b/PKX/f1-Main.cs index 9d12166c8..b1cdf3a97 100644 --- a/PKX/f1-Main.cs +++ b/PKX/f1-Main.cs @@ -441,6 +441,8 @@ namespace PKHeX BTN_RerollPID.PerformClick(); BTN_RerollEC.PerformClick(); if (Set.Shiny) BTN_Shinytize.PerformClick(); + pk6 = preparepkx(); + updateLegality(); } private void clickShowdownExportPK6(object sender, EventArgs e) { @@ -2151,16 +2153,15 @@ namespace PKHeX { LegalityAnalysis la = new LegalityAnalysis(pk); Util.Alert(la.Report); // temp - PB_Legal.Visible = pk.Gen6; if (tabs) - PB_Legal.Image = Legality.Valid ? Properties.Resources.valid : Properties.Resources.warn; + updateLegality(la); } - private void updateLegality() + private void updateLegality(LegalityAnalysis la = null) { if (!fieldsLoaded) return; - Legality = new LegalityAnalysis(pk6); + Legality = la ?? new LegalityAnalysis(pk6); PB_Legal.Image = Legality.Valid ? Properties.Resources.valid : Properties.Resources.warn; PB_Legal.Visible = pk6.Gen6;