mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +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 Lazy<Waveform> waveform;
|
||||
private Lazy<Waveform> waveform;
|
||||
private readonly Lazy<Storyboard> storyboard;
|
||||
private readonly Lazy<ISkin> skin;
|
||||
private Track track; // track is not Lazy as we allow transferring and loading multiple times.
|
||||
@ -329,6 +329,12 @@ namespace osu.Game.Beatmaps
|
||||
|
||||
#endregion
|
||||
|
||||
public void InvalidateWaveform()
|
||||
{
|
||||
if (waveform.IsValueCreated)
|
||||
waveform = new Lazy<Waveform>(GetWaveform);
|
||||
}
|
||||
|
||||
public override string ToString() => BeatmapInfo.ToString();
|
||||
|
||||
public abstract Stream GetStream(string storagePath);
|
||||
|
@ -118,7 +118,7 @@ namespace osu.Game.Screens.Edit.Setup
|
||||
}
|
||||
|
||||
working.Value.Metadata.AudioFile = destination.Name;
|
||||
|
||||
working.Value.InvalidateWaveform();
|
||||
editorBeatmap.SaveState();
|
||||
music.ReloadCurrentTrack();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user