Add beatmap deletion support.

Note that this is a very naive approach and will result in file access exceptions. This will be fixed in a further commit.
This commit is contained in:
Dean Herbert
2017-02-24 14:37:54 +09:00
parent 3a89348413
commit 6c3bda18b6
4 changed files with 61 additions and 7 deletions

View File

@ -254,14 +254,16 @@ namespace osu.Game.Overlays
{
progress.IsEnabled = (beatmapSource.Value != null);
if (beatmapSource.Value == current) return;
bool audioEquals = current?.BeatmapInfo.AudioEquals(beatmapSource.Value.BeatmapInfo) ?? false;
bool audioEquals = current?.BeatmapInfo?.AudioEquals(beatmapSource?.Value?.BeatmapInfo) ?? false;
current = beatmapSource.Value;
updateDisplay(current, audioEquals ? TransformDirection.None : TransformDirection.Next);
appendToHistory(current.BeatmapInfo);
appendToHistory(current?.BeatmapInfo);
}
private void appendToHistory(BeatmapInfo beatmap)
{
if (beatmap == null) return;
if (playHistoryIndex >= 0)
{
if (beatmap.AudioEquals(playHistory[playHistoryIndex]))