1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 00:43:21 +08:00

Remove performance optimisation tracking disables to keep things simple for now

This commit is contained in:
Dean Herbert 2018-05-30 13:43:43 +09:00
parent 4a7de043e0
commit eb89317494

View File

@ -240,12 +240,8 @@ namespace osu.Game.Database
/// <param name="item">The item to delete.</param>
public void Delete(TModel item)
{
using (var usage = ContextFactory.GetForWrite())
using (ContextFactory.GetForWrite())
{
var context = usage.Context;
context.ChangeTracker.AutoDetectChangesEnabled = false;
// re-fetch the model on the import context.
var foundModel = queryModel().Include(s => s.Files).ThenInclude(f => f.FileInfo).First(s => s.ID == item.ID);
@ -253,8 +249,6 @@ namespace osu.Game.Database
if (ModelStore.Delete(foundModel))
Files.Dereference(foundModel.Files.Select(f => f.FileInfo).ToArray());
context.ChangeTracker.AutoDetectChangesEnabled = true;
}
}