mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Restore clipboard content after difficulty switch
This commit is contained in:
@ -744,13 +744,16 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
protected void SwitchToDifficulty(BeatmapInfo nextBeatmap) => loader?.ScheduleDifficultySwitch(nextBeatmap, new EditorState
|
||||
{
|
||||
Time = clock.CurrentTimeAccurate
|
||||
Time = clock.CurrentTimeAccurate,
|
||||
ClipboardContent = editorBeatmap.BeatmapInfo.RulesetID == nextBeatmap.RulesetID ? clipboard.Value : null
|
||||
});
|
||||
|
||||
private void restoreState([NotNull] EditorState state)
|
||||
{
|
||||
if (state.Time != null)
|
||||
clock.Seek(state.Time.Value);
|
||||
|
||||
clipboard.Value = state.ClipboardContent ?? clipboard.Value;
|
||||
}
|
||||
|
||||
private void cancelExit() => loader?.CancelPendingDifficultySwitch();
|
||||
|
Reference in New Issue
Block a user