fix switcher between modes in DatasetExplorer.xaml

This commit is contained in:
Alex Bezdieniezhnykh
2025-03-02 21:32:31 +02:00
parent 227d01ba5e
commit d93da15528
15 changed files with 141 additions and 55 deletions
@@ -92,11 +92,14 @@ public class DatasetExplorerEventHandler(
//TODO: For editing existing need to handle updates
datasetExplorer.AddAnnotationToDict(annotation);
if (annotation.Classes.Contains(selectedClass))
if (annotation.Classes.Contains(selectedClass) || selectedClass == -1)
{
var annThumb = new AnnotationThumbnail(annotation);
datasetExplorer.SelectedAnnotations.Add(annThumb);
datasetExplorer.SelectedAnnotationDict.Add(annThumb.Annotation.Name, annThumb);
if (!datasetExplorer.SelectedAnnotationDict.ContainsKey(annThumb.Annotation.Name))
{
datasetExplorer.SelectedAnnotations.Insert(0, annThumb);
datasetExplorer.SelectedAnnotationDict.Add(annThumb.Annotation.Name, annThumb);
}
}
await Task.CompletedTask;
}