Always return to main menu before attempting to present a score from import

This commit is contained in:
Dean Herbert 2022-10-03 20:04:37 +09:00
parent 7fbbe88c8e
commit 332d63b53b
1 changed files with 3 additions and 1 deletions

View File

@ -561,6 +561,8 @@ public void PresentScore(IScoreInfo score, ScorePresentType presentType = ScoreP
return; return;
} }
// This should be able to be performed from song select, but that is disabled for now
// due to the weird decoupled ruleset logic (which can cause a crash in certain filter scenarios).
PerformFromScreen(screen => PerformFromScreen(screen =>
{ {
Logger.Log($"{nameof(PresentScore)} updating beatmap ({databasedBeatmap}) and ruleset ({databasedScore.ScoreInfo.Ruleset} to match score)"); Logger.Log($"{nameof(PresentScore)} updating beatmap ({databasedBeatmap}) and ruleset ({databasedScore.ScoreInfo.Ruleset} to match score)");
@ -578,7 +580,7 @@ public void PresentScore(IScoreInfo score, ScorePresentType presentType = ScoreP
screen.Push(new SoloResultsScreen(databasedScore.ScoreInfo, false)); screen.Push(new SoloResultsScreen(databasedScore.ScoreInfo, false));
break; break;
} }
}, validScreens: new[] { typeof(PlaySongSelect) }); });
} }
public override Task Import(params ImportTask[] imports) public override Task Import(params ImportTask[] imports)