mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-24 04:53:08 +00:00
Minor tweaks
Update legality on showdown export Update all legality on legality analysis triggered (PB_Legal or contextmenu)
This commit is contained in:
parent
d436caf273
commit
7269c97699
1 changed files with 5 additions and 4 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue