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); setInfo.Beatmaps.Remove(beatmapInfo);
updateHashAndMarkDirty(setInfo); 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. // 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]; BeatmapInfo nextToShow = difficultiesBeforeDeletion[deletedIndex == 0 ? 1 : deletedIndex - 1];
Beatmap.Value = beatmapManager.GetWorkingBeatmap(nextToShow, true); Beatmap.Value = beatmapManager.GetWorkingBeatmap(nextToShow);
SwitchToDifficulty(nextToShow); SwitchToDifficulty(nextToShow);
} }