mirror of
https://github.com/ppy/osu
synced 2024-12-14 02:46:27 +00:00
Reduce the possibility of recomputing drawables when underlying beatmap hasn't changed
This commit is contained in:
parent
12716d2ab4
commit
cab12ee55a
@ -49,6 +49,8 @@ namespace osu.Game.Screens.Select
|
||||
get { return beatmap; }
|
||||
set
|
||||
{
|
||||
if (beatmap == value) return;
|
||||
|
||||
beatmap = value;
|
||||
|
||||
pendingBeatmapSwitch?.Cancel();
|
||||
|
@ -100,6 +100,8 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
get { return beatmap; }
|
||||
set
|
||||
{
|
||||
if (beatmap == value) return;
|
||||
|
||||
beatmap = value;
|
||||
Scores = null;
|
||||
|
||||
|
@ -313,15 +313,15 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
bool beatmapSetChange = false;
|
||||
|
||||
if (!beatmap.Equals(Beatmap?.BeatmapInfo))
|
||||
if (beatmap.Equals(Beatmap?.BeatmapInfo))
|
||||
return;
|
||||
|
||||
if (beatmap.BeatmapSetInfoID == selectionChangeNoBounce?.BeatmapSetInfoID)
|
||||
sampleChangeDifficulty.Play();
|
||||
else
|
||||
{
|
||||
if (beatmap.BeatmapSetInfoID == selectionChangeNoBounce?.BeatmapSetInfoID)
|
||||
sampleChangeDifficulty.Play();
|
||||
else
|
||||
{
|
||||
sampleChangeBeatmap.Play();
|
||||
beatmapSetChange = true;
|
||||
}
|
||||
sampleChangeBeatmap.Play();
|
||||
beatmapSetChange = true;
|
||||
}
|
||||
|
||||
selectionChangeNoBounce = beatmap;
|
||||
|
Loading…
Reference in New Issue
Block a user