mirror of
https://github.com/azaion/annotations.git
synced 2026-04-23 01:46:31 +00:00
update validation logic
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
using System.Windows;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Threading;
|
||||
using Azaion.Common.Database;
|
||||
using Azaion.Common.DTO;
|
||||
using Azaion.Common.DTO.Queue;
|
||||
using Azaion.Common.Events;
|
||||
@@ -96,8 +97,14 @@ public class DatasetExplorerEventHandler(
|
||||
var annotations = datasetExplorer.ThumbnailsView.SelectedItems.Cast<AnnotationThumbnail>()
|
||||
.Select(x => x.Annotation)
|
||||
.ToList();
|
||||
foreach (var annotation in annotations)
|
||||
await annotationService.ValidateAnnotation(annotation, cancellationToken);
|
||||
await annotationService.ValidateAnnotations(annotations, cancellationToken);
|
||||
foreach (var ann in datasetExplorer.SelectedAnnotations.Where(x => annotations.Contains(x.Annotation)))
|
||||
{
|
||||
ann.Annotation.AnnotationStatus = AnnotationStatus.Validated;
|
||||
if (datasetExplorer.SelectedAnnotationDict.TryGetValue(ann.Annotation.Name, out var value))
|
||||
value.Annotation.AnnotationStatus = AnnotationStatus.Validated;
|
||||
ann.UpdateUI();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user