diff --git a/osu.Game/Screens/Edit/Compose/Components/EditorSelectionHandler.cs b/osu.Game/Screens/Edit/Compose/Components/EditorSelectionHandler.cs
index 0fc305dcc4..6ab4ca8267 100644
--- a/osu.Game/Screens/Edit/Compose/Components/EditorSelectionHandler.cs
+++ b/osu.Game/Screens/Edit/Compose/Components/EditorSelectionHandler.cs
@@ -108,17 +108,6 @@ namespace osu.Game.Screens.Edit.Compose.Components
}
}
- ///
- /// Given a selection target and a function of truth, retrieve the correct ternary state for display.
- ///
- protected TernaryState GetStateFromSelection(IEnumerable selection, Func func)
- {
- if (selection.Any(func))
- return selection.All(func) ? TernaryState.True : TernaryState.Indeterminate;
-
- return TernaryState.False;
- }
-
#endregion
#region Ternary state changes
diff --git a/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs b/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs
index cb3424a250..c0dbc5e7db 100644
--- a/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs
+++ b/osu.Game/Screens/Edit/Compose/Components/SelectionHandler.cs
@@ -268,6 +268,17 @@ namespace osu.Game.Screens.Edit.Compose.Components
DeleteSelected();
}
+ ///
+ /// Given a selection target and a function of truth, retrieve the correct ternary state for display.
+ ///
+ protected static TernaryState GetStateFromSelection(IEnumerable selection, Func func)
+ {
+ if (selection.Any(func))
+ return selection.All(func) ? TernaryState.True : TernaryState.Indeterminate;
+
+ return TernaryState.False;
+ }
+
///
/// Called whenever the deletion of items has been requested.
///
diff --git a/osu.Game/Skinning/Editor/SkinSelectionHandler.cs b/osu.Game/Skinning/Editor/SkinSelectionHandler.cs
index 0408ce74a6..044ad88333 100644
--- a/osu.Game/Skinning/Editor/SkinSelectionHandler.cs
+++ b/osu.Game/Skinning/Editor/SkinSelectionHandler.cs
@@ -53,21 +53,9 @@ namespace osu.Game.Skinning.Editor
return displayableAnchors.Select(a =>
{
- var countExisting = selection.Count(b => ((Drawable)b.Item).Anchor == a);
- var countTotal = selection.Count();
-
- TernaryState state;
-
- if (countExisting == countTotal)
- state = TernaryState.True;
- else if (countExisting > 0)
- state = TernaryState.Indeterminate;
- else
- state = TernaryState.False;
-
return new AnchorMenuItem(a, selection, _ => applyAnchor(a))
{
- State = { Value = state }
+ State = { Value = GetStateFromSelection(selection, c => ((Drawable)c.Item).Anchor == a) }
};
});
}