Fix duplicate working incorrectly if there is no selection currently made

This commit is contained in:
Dean Herbert 2022-10-25 11:42:12 +09:00
parent da74690ec9
commit 1e579e06f8
1 changed files with 4 additions and 0 deletions

View File

@ -777,6 +777,10 @@ private void rebindClipboardBindables()
protected void Duplicate()
{
// Avoid attempting to clone if copying is not available (as it may result in pasting something unexpected).
if (!canCopy.Value)
return;
// This is an initial implementation just to get an idea of how people used this function.
// There are a couple of differences from osu!stable's implementation which will require more work to match:
// - The "clipboard" is not populated during the duplication process.