1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-13 11:12:54 +08:00

Invalidate working beatmap cache when calling DeleteDifficultyImmediately rather than in editor code

This commit is contained in:
Dean Herbert 2022-09-06 18:10:59 +09:00
parent 579e7e1f17
commit db15bd56e8
2 changed files with 2 additions and 1 deletions

View File

@ -385,6 +385,7 @@ namespace osu.Game.Beatmaps
setInfo.Beatmaps.Remove(beatmapInfo);
updateHashAndMarkDirty(setInfo);
workingBeatmapCache.Invalidate(setInfo);
});
}

View File

@ -929,7 +929,7 @@ namespace osu.Game.Screens.Edit
// of note, we're still working with the cloned version, so indices are all prior to deletion.
BeatmapInfo nextToShow = difficultiesBeforeDeletion[deletedIndex == 0 ? 1 : deletedIndex - 1];
Beatmap.Value = beatmapManager.GetWorkingBeatmap(nextToShow, true);
Beatmap.Value = beatmapManager.GetWorkingBeatmap(nextToShow);
SwitchToDifficulty(nextToShow);
}