mirror of
https://github.com/osukey/osukey.git
synced 2025-05-28 08:57:25 +09:00
Fix empty selection via keyboard shortcuts crashing
This commit is contained in:
parent
001cd1194c
commit
2d9b0acabe
@ -3,6 +3,7 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using osu.Framework;
|
||||
using osu.Framework.Allocation;
|
||||
@ -439,6 +440,9 @@ namespace osu.Game.Screens.Edit
|
||||
|
||||
protected void Copy()
|
||||
{
|
||||
if (editorBeatmap.SelectedHitObjects.Count == 0)
|
||||
return;
|
||||
|
||||
clipboard.Value = new ClipboardContent(editorBeatmap).Serialize();
|
||||
}
|
||||
|
||||
@ -448,6 +452,9 @@ namespace osu.Game.Screens.Edit
|
||||
return;
|
||||
|
||||
var objects = clipboard.Value.Deserialize<ClipboardContent>().HitObjects;
|
||||
|
||||
Debug.Assert(objects.Any());
|
||||
|
||||
double timeOffset = clock.CurrentTime - objects.First().StartTime;
|
||||
|
||||
foreach (var h in objects)
|
||||
|
Loading…
x
Reference in New Issue
Block a user