Misc behavior updates

Closes #855
This commit is contained in:
Kurt 2017-02-13 20:42:39 -08:00
parent 749aa97bb3
commit 6722afef76

View File

@ -913,6 +913,8 @@ private void openSAV(SaveFile sav, string path)
}
// clean fields
bool WindowToggleRequired = SAV.Generation < 3 && sav.Generation >= 3; // version combobox refresh hack
bool WindowTranslationRequired = false;
PKM pk = preparePKM();
populateFields(SAV.BlankPKM);
SAV = sav;
@ -957,8 +959,6 @@ private void openSAV(SaveFile sav, string path)
}
setPKXBoxes(); // Reload all of the PKX Windows
bool WindowTranslationRequired = false;
// Hide content if not present in game.
GB_SUBE.Visible = SAV.HasSUBE;
PB_Locked.Visible = SAV.HasBattleBox && SAV.BattleBoxLocked;
@ -1201,7 +1201,17 @@ private void openSAV(SaveFile sav, string path)
PKMConverter.updateConfig(SAV.SubRegion, SAV.Country, SAV.ConsoleRegion, SAV.OT, SAV.Gender, SAV.Language);
if (WindowTranslationRequired) // force update -- re-added controls may be untranslated
{
// Keep window title
title = Text;
WinFormsUtil.TranslateInterface(this, curlanguage);
Text = title;
}
if (WindowToggleRequired) // Version combobox selectedvalue needs a little help, only updates once it is visible
{
tabMain.SelectedTab = Tab_Met; // parent tab of CB_GameOrigin
tabMain.SelectedTab = Tab_Main; // first tab
}
// No changes made yet
UndoStack.Clear(); Menu_Undo.Enabled = false;