mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 13:06:31 +00:00
gps matcher async
put cryptography lib to fixed version fix race condition bug in queue handler add lock to db writing and backup to file db on each write
This commit is contained in:
@@ -25,9 +25,7 @@ namespace Azaion.Dataset.Controls
|
||||
return Math.Max(0, calculatedWidth); // Ensure width is not negative
|
||||
}
|
||||
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) =>
|
||||
[value];
|
||||
}
|
||||
}
|
||||
@@ -106,21 +106,6 @@ public partial class DatasetExplorer
|
||||
new List<DetectionClass> { new() {Id = -1, Name = "All", ShortName = "All"}}
|
||||
.Concat(_annotationConfig.DetectionClasses));
|
||||
LvClasses.Init(AllDetectionClasses);
|
||||
|
||||
_dbFactory.Run(db =>
|
||||
{
|
||||
var allAnnotations = db.Annotations
|
||||
.LoadWith(x => x.Detections)
|
||||
.OrderBy(x => x.AnnotationStatus)
|
||||
.ThenByDescending(x => x.CreatedDate)
|
||||
.ToList();
|
||||
|
||||
foreach (var annotation in allAnnotations)
|
||||
AddAnnotationToDict(annotation);
|
||||
return null!;
|
||||
});
|
||||
|
||||
DataContext = this;
|
||||
}
|
||||
|
||||
private async void OnLoaded(object sender, RoutedEventArgs e)
|
||||
@@ -138,6 +123,15 @@ public partial class DatasetExplorer
|
||||
|
||||
ExplorerEditor.CurrentAnnClass = LvClasses.CurrentDetectionClass ?? _annotationConfig.DetectionClasses.First();
|
||||
|
||||
var allAnnotations = await _dbFactory.Run(async db =>
|
||||
await db.Annotations.LoadWith(x => x.Detections)
|
||||
.OrderBy(x => x.AnnotationStatus)
|
||||
.ThenByDescending(x => x.CreatedDate)
|
||||
.ToListAsync());
|
||||
|
||||
foreach (var annotation in allAnnotations)
|
||||
AddAnnotationToDict(annotation);
|
||||
|
||||
await ReloadThumbnails();
|
||||
LoadClassDistribution();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user