added better logging to python

add day / winter / night switcher
This commit is contained in:
Alex Bezdieniezhnykh
2025-02-17 18:41:18 +02:00
parent 2ecbc9bfd4
commit c314268d1e
14 changed files with 204 additions and 103 deletions
@@ -42,7 +42,7 @@ public class DatasetExplorerEventHandler(
if ((int)key >= (int)Key.NumPad1 && (int)key <= (int)Key.NumPad9) keyNumber = key - Key.NumPad1;
if (keyNumber.HasValue)
datasetExplorer.LvClasses.SelectedIndex = keyNumber.Value;
datasetExplorer.LvClasses.SelectNum(keyNumber.Value);
else
{
if (datasetExplorer.Switcher.SelectedIndex == 1 && _keysControlEnumDict.TryGetValue(key, out var value))
@@ -88,13 +88,11 @@ public class DatasetExplorerEventHandler(
public async Task Handle(AnnotationCreatedEvent notification, CancellationToken cancellationToken)
{
var annotation = notification.Annotation;
var selectedClass = ((DetectionClass?)datasetExplorer.LvClasses.SelectedItem)?.Id;
if (selectedClass == null)
return;
var selectedClass = datasetExplorer.LvClasses.CurrentClassNumber;
//TODO: For editing existing need to handle updates
datasetExplorer.AddAnnotationToDict(annotation);
if (annotation.Classes.Contains(selectedClass.Value))
if (annotation.Classes.Contains(selectedClass))
{
var annThumb = new AnnotationThumbnail(annotation);
datasetExplorer.SelectedAnnotations.Add(annThumb);