mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 20:22:55 +08:00
Clear cached waveform on track change in editor
This commit is contained in:
parent
d81a724dd7
commit
66a02374da
@ -48,7 +48,7 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
private readonly object beatmapFetchLock = new object();
|
private readonly object beatmapFetchLock = new object();
|
||||||
|
|
||||||
private readonly Lazy<Waveform> waveform;
|
private Lazy<Waveform> waveform;
|
||||||
private readonly Lazy<Storyboard> storyboard;
|
private readonly Lazy<Storyboard> storyboard;
|
||||||
private readonly Lazy<ISkin> skin;
|
private readonly Lazy<ISkin> skin;
|
||||||
private Track track; // track is not Lazy as we allow transferring and loading multiple times.
|
private Track track; // track is not Lazy as we allow transferring and loading multiple times.
|
||||||
@ -329,6 +329,12 @@ namespace osu.Game.Beatmaps
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
public void InvalidateWaveform()
|
||||||
|
{
|
||||||
|
if (waveform.IsValueCreated)
|
||||||
|
waveform = new Lazy<Waveform>(GetWaveform);
|
||||||
|
}
|
||||||
|
|
||||||
public override string ToString() => BeatmapInfo.ToString();
|
public override string ToString() => BeatmapInfo.ToString();
|
||||||
|
|
||||||
public abstract Stream GetStream(string storagePath);
|
public abstract Stream GetStream(string storagePath);
|
||||||
|
@ -118,7 +118,7 @@ namespace osu.Game.Screens.Edit.Setup
|
|||||||
}
|
}
|
||||||
|
|
||||||
working.Value.Metadata.AudioFile = destination.Name;
|
working.Value.Metadata.AudioFile = destination.Name;
|
||||||
|
working.Value.InvalidateWaveform();
|
||||||
editorBeatmap.SaveState();
|
editorBeatmap.SaveState();
|
||||||
music.ReloadCurrentTrack();
|
music.ReloadCurrentTrack();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user