mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
Merge branch 'master' into efficient-user-retrieval
This commit is contained in:
@ -75,7 +75,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
|||||||
|
|
||||||
public override bool HandleQuickDeletion()
|
public override bool HandleQuickDeletion()
|
||||||
{
|
{
|
||||||
var hoveredControlPoint = ControlPointVisualiser.Pieces.FirstOrDefault(p => p.IsHovered);
|
var hoveredControlPoint = ControlPointVisualiser?.Pieces.FirstOrDefault(p => p.IsHovered);
|
||||||
|
|
||||||
if (hoveredControlPoint == null)
|
if (hoveredControlPoint == null)
|
||||||
return false;
|
return false;
|
||||||
|
@ -202,7 +202,9 @@ namespace osu.Game.Beatmaps
|
|||||||
/// <param name="cancellationToken">A token that may be used to cancel this update.</param>
|
/// <param name="cancellationToken">A token that may be used to cancel this update.</param>
|
||||||
private void updateBindable([NotNull] BindableStarDifficulty bindable, [CanBeNull] RulesetInfo rulesetInfo, [CanBeNull] IEnumerable<Mod> mods, CancellationToken cancellationToken = default)
|
private void updateBindable([NotNull] BindableStarDifficulty bindable, [CanBeNull] RulesetInfo rulesetInfo, [CanBeNull] IEnumerable<Mod> mods, CancellationToken cancellationToken = default)
|
||||||
{
|
{
|
||||||
GetAsync(new DifficultyCacheLookup(bindable.Beatmap, rulesetInfo, mods), cancellationToken)
|
// GetDifficultyAsync will fall back to existing data from BeatmapInfo if not locally available
|
||||||
|
// (contrary to GetAsync)
|
||||||
|
GetDifficultyAsync(bindable.Beatmap, rulesetInfo, mods, cancellationToken)
|
||||||
.ContinueWith(t =>
|
.ContinueWith(t =>
|
||||||
{
|
{
|
||||||
// We're on a threadpool thread, but we should exit back to the update thread so consumers can safely handle value-changed events.
|
// We're on a threadpool thread, but we should exit back to the update thread so consumers can safely handle value-changed events.
|
||||||
|
@ -20,6 +20,7 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
|
|||||||
{
|
{
|
||||||
base.LoadBeatmap(beatmap);
|
base.LoadBeatmap(beatmap);
|
||||||
|
|
||||||
|
controlPointGroups.UnbindAll();
|
||||||
controlPointGroups.BindTo(beatmap.Beatmap.ControlPointInfo.Groups);
|
controlPointGroups.BindTo(beatmap.Beatmap.ControlPointInfo.Groups);
|
||||||
controlPointGroups.BindCollectionChanged((sender, args) =>
|
controlPointGroups.BindCollectionChanged((sender, args) =>
|
||||||
{
|
{
|
||||||
|
@ -27,6 +27,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
|
|||||||
{
|
{
|
||||||
base.LoadBeatmap(beatmap);
|
base.LoadBeatmap(beatmap);
|
||||||
|
|
||||||
|
controlPointGroups.UnbindAll();
|
||||||
controlPointGroups.BindTo(beatmap.Beatmap.ControlPointInfo.Groups);
|
controlPointGroups.BindTo(beatmap.Beatmap.ControlPointInfo.Groups);
|
||||||
controlPointGroups.BindCollectionChanged((sender, args) =>
|
controlPointGroups.BindCollectionChanged((sender, args) =>
|
||||||
{
|
{
|
||||||
|
@ -499,6 +499,9 @@ namespace osu.Game.Screens.Edit
|
|||||||
// confirming exit without save means we should delete the new beatmap completely.
|
// confirming exit without save means we should delete the new beatmap completely.
|
||||||
beatmapManager.Delete(playableBeatmap.BeatmapInfo.BeatmapSet);
|
beatmapManager.Delete(playableBeatmap.BeatmapInfo.BeatmapSet);
|
||||||
|
|
||||||
|
// eagerly clear contents before restoring default beatmap to prevent value change callbacks from firing.
|
||||||
|
ClearInternal();
|
||||||
|
|
||||||
// in theory this shouldn't be required but due to EF core not sharing instance states 100%
|
// in theory this shouldn't be required but due to EF core not sharing instance states 100%
|
||||||
// MusicController is unaware of the changed DeletePending state.
|
// MusicController is unaware of the changed DeletePending state.
|
||||||
Beatmap.SetDefault();
|
Beatmap.SetDefault();
|
||||||
|
Reference in New Issue
Block a user