Fix party/other tab loading for sav loads

loading pbr/rsbox -> loading a game that has party & daycare causes the
daycare tab to be loaded in the incorrect spot.
PartyTab needs to be calculated closer to its use
This commit is contained in:
Kurt 2017-12-29 16:50:55 -08:00
parent ca20e78269
commit 648f250303

View File

@ -889,12 +889,11 @@ public bool ToggleInterface()
ToggleViewReset();
ToggleViewSubEditors(SAV);
int BoxTab = tabBoxMulti.TabPages.IndexOf(Tab_Box);
int PartyTab = tabBoxMulti.TabPages.IndexOf(Tab_PartyBattle);
bool WindowTranslationRequired = false;
WindowTranslationRequired |= ToggleViewBox(SAV);
int BoxTab = tabBoxMulti.TabPages.IndexOf(Tab_Box);
WindowTranslationRequired |= ToggleViewParty(SAV, BoxTab);
int PartyTab = tabBoxMulti.TabPages.IndexOf(Tab_PartyBattle);
WindowTranslationRequired |= ToggleViewDaycare(SAV, BoxTab, PartyTab);
SetPKMBoxes(); // Reload all of the PKX Windows
@ -956,7 +955,6 @@ private bool ToggleViewParty(SaveFile sav, int BoxTab)
}
private bool ToggleViewDaycare(SaveFile sav, int BoxTab, int PartyTab)
{
if (!sav.HasDaycare)
{
if (tabBoxMulti.TabPages.Contains(Tab_Other))