1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:57:39 +08:00

Ensure edited beatmap is restored to a baseline state on exit

This commit is contained in:
Bartłomiej Dach 2022-01-25 23:31:42 +01:00
parent 4382adad82
commit d760283665
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497

View File

@ -574,7 +574,9 @@ namespace osu.Game.Screens.Edit
// To update the game-wide beatmap with any changes, perform a re-fetch on exit/suspend.
// This is required as the editor makes its local changes via EditorBeatmap
// (which are not propagated outwards to a potentially cached WorkingBeatmap).
var refetchedBeatmap = beatmapManager.GetWorkingBeatmap(Beatmap.Value.BeatmapInfo);
((IWorkingBeatmapCache)beatmapManager).Invalidate(Beatmap.Value.BeatmapInfo);
var refetchedBeatmapInfo = beatmapManager.QueryBeatmap(b => b.ID == Beatmap.Value.BeatmapInfo.ID);
var refetchedBeatmap = beatmapManager.GetWorkingBeatmap(refetchedBeatmapInfo);
if (!(refetchedBeatmap is DummyWorkingBeatmap))
{