remove fix, todo: test

This commit is contained in:
Alex Bezdieniezhnykh
2025-01-03 18:32:56 +02:00
parent 9aebfd787b
commit ae2c62350a
19 changed files with 353 additions and 245 deletions
@@ -2,6 +2,7 @@
using System.Windows.Input;
using Azaion.Common.DTO;
using Azaion.Common.DTO.Queue;
using Azaion.Common.Events;
using Azaion.Common.Services;
using MediatR;
@@ -19,7 +20,7 @@ public class DatasetExplorerEventHandler(
{ Key.Delete, PlaybackControlEnum.RemoveSelectedAnns },
{ Key.X, PlaybackControlEnum.RemoveAllAnns },
{ Key.Escape, PlaybackControlEnum.Close },
{ Key.A, PlaybackControlEnum.ValidateAnnotations}
{ Key.V, PlaybackControlEnum.ValidateAnnotations}
};
public async Task Handle(DatasetExplorerControlEvent notification, CancellationToken cancellationToken)
@@ -74,13 +75,11 @@ public class DatasetExplorerEventHandler(
datasetExplorer.SwitchTab(toEditor: false);
break;
case PlaybackControlEnum.ValidateAnnotations:
var annotations = datasetExplorer.ThumbnailsView.SelectedItems.Cast<AnnotationImageView>()
var annotations = datasetExplorer.ThumbnailsView.SelectedItems.Cast<AnnotationThumbnail>()
.Select(x => x.Annotation)
.ToList();
foreach (var annotation in annotations)
{
await annotationService.ValidateAnnotation(annotation, cancellationToken);
}
break;
}
}