From 1dd4919adce7af336deb31bde19081060545d6e1 Mon Sep 17 00:00:00 2001 From: Kaphotics Date: Fri, 22 Jul 2016 00:01:52 -0700 Subject: [PATCH] Speed up form translation defer layout until after translation --- Util/FormUtil.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Util/FormUtil.cs b/Util/FormUtil.cs index f09b2a867..1916f81e5 100644 --- a/Util/FormUtil.cs +++ b/Util/FormUtil.cs @@ -55,6 +55,7 @@ internal static void TranslateInterface(Control form, string lang) return; // Find control then change display Text. + form.SuspendLayout(); foreach (string str in stringdata) { string[] SplitString = str.Split(new[] { " = " }, StringSplitOptions.None); @@ -72,6 +73,7 @@ internal static void TranslateInterface(Control form, string lang) else if (c is ToolStripItem) (c as ToolStripItem).Text = text; } + form.ResumeLayout(); } private static object FindControl(string name, Control.ControlCollection c) {