Added an event for a changed translation

This commit is contained in:
tsommer committed 2022-09-26 19:25:51 +02:00
1 parent 1071439348
commit 6101f49f44
2 files changed
+15 -2

No files matched your search

@@ -124,8 +124,11 @@ public sealed partial class Translation : UserControl
private async void SaveChanges(object? sender, ElapsedEventArgs e)
{
if (this.currentTranslationId > -1)
await TranslationProcessor.SaveChangedTranslation(this.currentTranslationId, this.textBox.Text, this.checkBoxManual.Checked);
{
var storedTranslation = await TranslationProcessor.SaveChangedTranslation(this.currentTranslationId, this.textBox.Text, this.checkBoxManual.Checked);
AppEvents.TranslationChanged(storedTranslation.Result);
}
if(this.ParentForm is UI_WinForms.Main main)
main.RemoveDeferredSaveOperation(this.currentTranslationId);