correct app close

fix publishing
This commit is contained in:
Alex Bezdieniezhnykh
2025-03-03 19:37:07 +02:00
parent f108cca5f5
commit a493606f64
6 changed files with 43 additions and 21 deletions
@@ -95,11 +95,16 @@ public class DatasetExplorerEventHandler(
if (annotation.Classes.Contains(selectedClass) || selectedClass == -1)
{
var annThumb = new AnnotationThumbnail(annotation);
if (!datasetExplorer.SelectedAnnotationDict.ContainsKey(annThumb.Annotation.Name))
if (datasetExplorer.SelectedAnnotationDict.ContainsKey(annThumb.Annotation.Name))
{
datasetExplorer.SelectedAnnotations.Insert(0, annThumb);
datasetExplorer.SelectedAnnotationDict.Add(annThumb.Annotation.Name, annThumb);
datasetExplorer.SelectedAnnotationDict.Remove(annThumb.Annotation.Name);
var ann = datasetExplorer.SelectedAnnotations.FirstOrDefault(x => x.Annotation.Name == annThumb.Annotation.Name);
if (ann != null)
datasetExplorer.SelectedAnnotations.Remove(ann);
}
datasetExplorer.SelectedAnnotations.Insert(0, annThumb);
datasetExplorer.SelectedAnnotationDict.Add(annThumb.Annotation.Name, annThumb);
}
await Task.CompletedTask;
}