From 6722afef76490f1f38491114e7c4675e6d3f032b Mon Sep 17 00:00:00 2001 From: Kurt Date: Mon, 13 Feb 2017 20:42:39 -0800 Subject: [PATCH] Misc behavior updates Closes #855 --- PKHeX.WinForms/MainWindow/Main.cs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/PKHeX.WinForms/MainWindow/Main.cs b/PKHeX.WinForms/MainWindow/Main.cs index 1ac147e69..0e7045140 100644 --- a/PKHeX.WinForms/MainWindow/Main.cs +++ b/PKHeX.WinForms/MainWindow/Main.cs @@ -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;