mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 12:57:39 +09:00
Only switch to found group if non-null
This commit is contained in:
parent
187acb0718
commit
534e8f8fac
@ -158,9 +158,12 @@ namespace osu.Game.Screens.Edit.Timing
|
|||||||
// To improve the efficiency of this in the future, we should reconsider the overall structure of ControlPointInfo.
|
// To improve the efficiency of this in the future, we should reconsider the overall structure of ControlPointInfo.
|
||||||
|
|
||||||
// Find the next group which has the same type as the selected one.
|
// Find the next group which has the same type as the selected one.
|
||||||
selectedGroup.Value = Beatmap.ControlPointInfo.Groups
|
var found = Beatmap.ControlPointInfo.Groups
|
||||||
.Where(g => g.ControlPoints.Any(cp => cp.GetType() == selectedPointType))
|
.Where(g => g.ControlPoints.Any(cp => cp.GetType() == selectedPointType))
|
||||||
.LastOrDefault(g => g.Time <= clock.CurrentTimeAccurate);
|
.LastOrDefault(g => g.Time <= clock.CurrentTimeAccurate);
|
||||||
|
|
||||||
|
if (found != null)
|
||||||
|
selectedGroup.Value = found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user