fix keyboard event retrieving for dataset explorer

This commit is contained in:
Alex Bezdieniezhnykh
2024-12-05 00:34:00 +02:00
parent 60519461a1
commit 626767469a
3 changed files with 4 additions and 6 deletions
+1 -3
View File
@@ -24,7 +24,6 @@ public partial class DatasetExplorer
private int _tempSelectedClassIdx = 0;
private readonly IGalleryManager _galleryManager;
private readonly FormState _formState;
public bool ThumbnailLoading { get; set; }
@@ -41,10 +40,10 @@ public partial class DatasetExplorer
_annotationConfig = annotationConfig.Value;
_logger = logger;
_galleryManager = galleryManager;
_formState = formState;
InitializeComponent();
Loaded += OnLoaded;
Activated += (_, _) => formState.ActiveWindow = WindowEnum.DatasetExplorer;
ThumbnailsView.KeyDown += async (sender, args) =>
{
@@ -109,7 +108,6 @@ public partial class DatasetExplorer
foreach (var ann in ExplorerEditor.CurrentAnns.Where(x => x.IsSelected))
ann.AnnotationClass = selectedClass;
};
Activated += (_, _) => _formState.ActiveWindow = WindowEnum.Annotator;
LvClasses.SelectedIndex = _annotationConfig.LastSelectedExplorerClass ?? 0;
ExplorerEditor.CurrentAnnClass = (AnnotationClass)LvClasses.SelectedItem;