Made translations read-only when using DeepL in automatic mode

This commit is contained in:
Thorsten Sommer 2022-09-21 20:09:40 +02:00
parent e659bb7191
commit 10434c553a
Signed by: tsommer
GPG Key ID: 371BBA77A02C0108
2 changed files with 2 additions and 1 deletions

View File

@ -49,6 +49,7 @@ public sealed partial class Translation : UserControl
private async Task LateSetup(AppSettings.CultureInfo cultureInfo)
{
this.isDeepLSourceCulture = await AppSettings.GetDeepLSourceCultureIndex() == cultureInfo.Index;
this.textBox.ReadOnly = !(this.isDeepLSourceCulture || await AppSettings.GetDeepLAction() == SettingDeepLAction.MANUAL);
this.buttonDeepL.Visible = await AppSettings.GetDeepLMode() != SettingDeepLMode.DISABLED;
this.buttonDeepL.Image = this.isDeepLSourceCulture ? Icons.icons8_trigger_1__svg : Icons.deepl_logo_icon_170284;

View File

@ -103,7 +103,7 @@ public partial class Translations : UserControl
internal async Task MainCultureWasChanged()
{
if(this.mainCulture is null || await AppSettings.GetDeepLMode() == SettingDeepLMode.DISABLED || await AppSettings.GetDeepLAction() == SettingDeepLAction.MANUAL)
if(this.mainCulture is null || await AppSettings.GetDeepLMode() == SettingDeepLMode.DISABLED)
return;
var allTasks = new List<Task>();