mirror of https://github.com/ppy/osu
Fix in a slightly different and hopefully more understandable way
This commit is contained in:
parent
f56b85ce27
commit
ee1ccb8bcb
|
@ -426,7 +426,7 @@ private void updateSelectedRuleset(RulesetInfo ruleset)
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// selection has been changed as the result of a user interaction.
|
||||
/// Selection has been changed as the result of a user interaction.
|
||||
/// </summary>
|
||||
private void performUpdateSelected()
|
||||
{
|
||||
|
@ -435,7 +435,7 @@ private void performUpdateSelected()
|
|||
|
||||
selectionChangedDebounce?.Cancel();
|
||||
|
||||
if (beatmap == null)
|
||||
if (beatmapNoDebounce == null)
|
||||
run();
|
||||
else
|
||||
selectionChangedDebounce = Scheduler.AddDelayed(run, 200);
|
||||
|
@ -448,11 +448,11 @@ void run()
|
|||
{
|
||||
Mods.Value = Array.Empty<Mod>();
|
||||
|
||||
// the ruleset transfer may cause a deselection of the current beatmap (due to incompatibility).
|
||||
// this can happen via Carousel.FlushPendingFilterOperations().
|
||||
// to ensure a good state, re-transfer no-debounce values.
|
||||
performUpdateSelected();
|
||||
return;
|
||||
// transferRulesetValue() may trigger a refilter. If the current selection does not match the new ruleset, we want to switch away from it.
|
||||
// The default logic on WorkingBeatmap change is to switch to a matching ruleset (see workingBeatmapChanged()), but we don't want that here.
|
||||
// We perform an early selection attempt and clear out the beatmap selection to avoid a second ruleset change (revert).
|
||||
if (beatmap != null && !Carousel.SelectBeatmap(beatmap, false))
|
||||
beatmap = null;
|
||||
}
|
||||
|
||||
// We may be arriving here due to another component changing the bindable Beatmap.
|
||||
|
@ -716,7 +716,7 @@ private bool transferRulesetValue()
|
|||
if (decoupledRuleset.Value?.Equals(Ruleset.Value) == true)
|
||||
return false;
|
||||
|
||||
Logger.Log($"decoupled ruleset transferred (\"{decoupledRuleset.Value}\" -> \"{Ruleset.Value}\"");
|
||||
Logger.Log($"decoupled ruleset transferred (\"{decoupledRuleset.Value}\" -> \"{Ruleset.Value}\")");
|
||||
rulesetNoDebounce = decoupledRuleset.Value = Ruleset.Value;
|
||||
|
||||
// if we have a pending filter operation, we want to run it now.
|
||||
|
|
Loading…
Reference in New Issue