Made translations read-only when using DeepL in automatic mode

This commit is contained in:
tsommer committed 2022-09-21 20:09:40 +02:00
1 parent e659bb7191
commit 10434c553a
2 files changed
+2 -1

No files matched your search

@@ -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;
@@ -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>();