fix ai detection bugs #2

This commit is contained in:
Alex Bezdieniezhnykh
2024-11-05 13:01:36 +02:00
parent d8f60d7491
commit 5d537aeef6
6 changed files with 63 additions and 42 deletions
+7 -2
View File
@@ -243,6 +243,8 @@ public class MainWindowEventHandler :
private async Task SaveAnnotations()
{
var annGridSelectedIndex = _mainWindow.DgAnnotations.SelectedIndex;
if (_formState.CurrentMedia == null)
return;
@@ -270,14 +272,17 @@ public class MainWindowEventHandler :
//no need to save image, it's already there, just remove background
_mainWindow.Editor.Background = new SolidColorBrush(Color.FromArgb(1, 0, 0, 0));
_formState.BackgroundShown = false;
var annGrid = _mainWindow.DgAnnotations;
annGrid.SelectedIndex = Math.Min(annGrid.Items.Count, annGridSelectedIndex + 1);
_mainWindow.OpenAnnotationResult((AnnotationResult)annGrid.SelectedItem);
}
else
{
var resultHeight = (uint)Math.Round(RESULT_WIDTH / _formState.CurrentVideoSize.Width * _formState.CurrentVideoSize.Height);
_mediaPlayer.TakeSnapshot(0, destinationPath, RESULT_WIDTH, resultHeight);
_mediaPlayer.Play();
}
_mediaPlayer.Play();
}
else
{