mirror of
https://github.com/kwsch/PKHeX
synced 2024-11-26 22:10:21 +00:00
Get actual value rather than magic index
logic doesn't really work for gen2/3, so gate it behind gen4+ format only
This commit is contained in:
parent
fa7c8929b1
commit
523edecf7b
1 changed files with 10 additions and 5 deletions
|
@ -1370,11 +1370,16 @@ namespace PKHeX.WinForms.Controls
|
||||||
CAL_MetDate.Value = new DateTime(2000, 01, 01);
|
CAL_MetDate.Value = new DateTime(2000, 01, 01);
|
||||||
|
|
||||||
// if egg wasn't originally obtained by OT => Link Trade, else => None
|
// if egg wasn't originally obtained by OT => Link Trade, else => None
|
||||||
bool isTraded = false;
|
if (Entity.Format >= 4)
|
||||||
var sav = SaveFileRequested?.Invoke(this, e);
|
{
|
||||||
if (sav != null)
|
var sav = SaveFileRequested?.Invoke(this, e);
|
||||||
isTraded = sav.OT != TB_OT.Text || sav.TID != Entity.TID || sav.SID != Entity.SID;
|
if (sav != null)
|
||||||
CB_MetLocation.SelectedIndex = isTraded ? 2 : 0;
|
{
|
||||||
|
bool isTraded = sav.OT != TB_OT.Text || sav.TID != Entity.TID || sav.SID != Entity.SID;
|
||||||
|
var loc = isTraded ? Locations.TradedEggLocation(sav.Generation) : 0;
|
||||||
|
CB_MetLocation.SelectedValue = loc;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!CHK_Nicknamed.Checked)
|
if (!CHK_Nicknamed.Checked)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue