Rename to "clone" instead of "duplicate"

This commit is contained in:
Dean Herbert 2022-10-25 11:43:23 +09:00
parent 1e579e06f8
commit 4d4f6e25ba
5 changed files with 13 additions and 13 deletions

View File

@ -163,9 +163,9 @@ public void TestClone()
AddStep("select added object", () => EditorBeatmap.SelectedHitObjects.Add(addedObject));
AddAssert("is one object", () => EditorBeatmap.HitObjects.Count == 1);
AddStep("clone", () => Editor.Duplicate());
AddStep("clone", () => Editor.Clone());
AddAssert("is two objects", () => EditorBeatmap.HitObjects.Count == 2);
AddStep("clone", () => Editor.Duplicate());
AddStep("clone", () => Editor.Clone());
AddAssert("is three objects", () => EditorBeatmap.HitObjects.Count == 3);
}
@ -203,7 +203,7 @@ public void TestCloneNothing()
AddStep("deselect all objects", () => EditorBeatmap.SelectedHitObjects.Clear());
AddAssert("is one object", () => EditorBeatmap.HitObjects.Count == 1);
AddStep("clone", () => Editor.Duplicate());
AddStep("clone", () => Editor.Clone());
AddAssert("still one object", () => EditorBeatmap.HitObjects.Count == 1);
}
}

View File

@ -90,7 +90,7 @@ protected override void LoadComplete()
new KeyBinding(new[] { InputKey.F3 }, GlobalAction.EditorTimingMode),
new KeyBinding(new[] { InputKey.F4 }, GlobalAction.EditorSetupMode),
new KeyBinding(new[] { InputKey.Control, InputKey.Shift, InputKey.A }, GlobalAction.EditorVerifyMode),
new KeyBinding(new[] { InputKey.Control, InputKey.D }, GlobalAction.EditorDuplicateSelection),
new KeyBinding(new[] { InputKey.Control, InputKey.D }, GlobalAction.EditorCloneSelection),
new KeyBinding(new[] { InputKey.J }, GlobalAction.EditorNudgeLeft),
new KeyBinding(new[] { InputKey.K }, GlobalAction.EditorNudgeRight),
new KeyBinding(new[] { InputKey.G }, GlobalAction.EditorCycleGridDisplayMode),
@ -348,7 +348,7 @@ public enum GlobalAction
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.ToggleProfile))]
ToggleProfile,
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.EditorDuplicateSelection))]
EditorDuplicateSelection
[LocalisableDescription(typeof(GlobalActionKeyBindingStrings), nameof(GlobalActionKeyBindingStrings.EditorCloneSelection))]
EditorCloneSelection
}
}

View File

@ -185,9 +185,9 @@ public static class GlobalActionKeyBindingStrings
public static LocalisableString EditorTapForBPM => new TranslatableString(getKey(@"editor_tap_for_bpm"), @"Tap for BPM");
/// <summary>
/// "Duplicate selection"
/// "Clone selection"
/// </summary>
public static LocalisableString EditorDuplicateSelection => new TranslatableString(getKey(@"editor_duplicate_selection"), @"Duplicate selection");
public static LocalisableString EditorCloneSelection => new TranslatableString(getKey(@"editor_clone_selection"), @"Clone selection");
/// <summary>
/// "Cycle grid display mode"

View File

@ -304,7 +304,7 @@ private void load(OsuConfigManager config)
cutMenuItem = new EditorMenuItem("Cut", MenuItemType.Standard, Cut),
copyMenuItem = new EditorMenuItem("Copy", MenuItemType.Standard, Copy),
pasteMenuItem = new EditorMenuItem("Paste", MenuItemType.Standard, Paste),
duplicateMenuItem = new EditorMenuItem("Duplicate", MenuItemType.Standard, Duplicate),
duplicateMenuItem = new EditorMenuItem("Clone", MenuItemType.Standard, Clone),
}
},
new MenuItem("View")
@ -576,8 +576,8 @@ public bool OnPressed(KeyBindingPressEvent<GlobalAction> e)
this.Exit();
return true;
case GlobalAction.EditorDuplicateSelection:
Duplicate();
case GlobalAction.EditorCloneSelection:
Clone();
return true;
case GlobalAction.EditorComposeMode:
@ -775,7 +775,7 @@ private void rebindClipboardBindables()
protected void Copy() => currentScreen?.Copy();
protected void Duplicate()
protected void Clone()
{
// Avoid attempting to clone if copying is not available (as it may result in pasting something unexpected).
if (!canCopy.Value)

View File

@ -110,7 +110,7 @@ protected class TestEditor : Editor
public new void Paste() => base.Paste();
public new void Duplicate() => base.Duplicate();
public new void Clone() => base.Clone();
public new void SwitchToDifficulty(BeatmapInfo beatmapInfo) => base.SwitchToDifficulty(beatmapInfo);