diff --git a/STranslate/MainWindow.xaml b/STranslate/MainWindow.xaml index 065b189..8164fdf 100644 --- a/STranslate/MainWindow.xaml +++ b/STranslate/MainWindow.xaml @@ -102,6 +102,7 @@ diff --git a/STranslate/MainWindow.xaml.cs b/STranslate/MainWindow.xaml.cs index ebefbb2..95d1c47 100644 --- a/STranslate/MainWindow.xaml.cs +++ b/STranslate/MainWindow.xaml.cs @@ -301,5 +301,14 @@ namespace STranslate private bool _IsTopmost { get; set; } private readonly string _TopmostTemplateName = "ButtonTemplateTopmost"; private readonly string _UnTopmostTemplateName = "ButtonTemplateUnTopmost"; + + private void SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e) + { + if (!string.IsNullOrEmpty(vm?.InputTxt)) + { + vm.IdentifyLanguage = string.Empty; + _ = vm?.Translate(); + } + } } } \ No newline at end of file