From: DeaDDooMER Date: Tue, 23 May 2023 16:47:52 +0000 (+0300) Subject: gui: fix crash on language selection X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=73501e904776246ca81b42be2b14015df1f4d084;p=d2df-editor.git gui: fix crash on language selection --- diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas index 8fd661a..2175824 100644 --- a/src/editor/f_main.pas +++ b/src/editor/f_main.pas @@ -6244,12 +6244,13 @@ begin MainForm.ActiveControl := RenderPanel; // Язык: - if gLanguage = '' then + if (gLanguage = '') and not (fsModal in SelectLanguageForm.FormState) then begin lang := SelectLanguageForm.ShowModal(); case lang of 1: gLanguage := LANGUAGE_ENGLISH; - else gLanguage := LANGUAGE_RUSSIAN; + 2: gLanguage := LANGUAGE_RUSSIAN; + else gLanguage := LANGUAGE_ENGLISH; end; config := TConfig.CreateFile(CfgFileName);