mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 14:26:30 +00:00
fix ai detection bugs #2
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user