From 36df1da57fda5cbfc8c44d97f24c7d4f0d7346f3 Mon Sep 17 00:00:00 2001
From: Gabe Livengood <47010459+ggliv@users.noreply.github.com>
Date: Sun, 19 Jun 2022 14:26:02 -0400
Subject: [PATCH] Revert "stop component transform when skineditor is hidden"
This reverts commit 48ffd6aeb5c131a120a9c82e889348ebf3d21dfb.
---
.../Skinning/Editor/SkinSelectionHandler.cs | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/osu.Game/Skinning/Editor/SkinSelectionHandler.cs b/osu.Game/Skinning/Editor/SkinSelectionHandler.cs
index 2496d7c657..2e2122f7c2 100644
--- a/osu.Game/Skinning/Editor/SkinSelectionHandler.cs
+++ b/osu.Game/Skinning/Editor/SkinSelectionHandler.cs
@@ -11,7 +11,6 @@ using osu.Framework.Extensions.EnumExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.UserInterface;
-using osu.Framework.Graphics.Containers;
using osu.Framework.Utils;
using osu.Game.Extensions;
using osu.Game.Graphics.UserInterface;
@@ -26,17 +25,8 @@ namespace osu.Game.Skinning.Editor
[Resolved]
private SkinEditor skinEditor { get; set; }
- ///
- /// Whether the 's state allows selected blueprints to undergo transformations.
- /// Used to prevent operations from being performed on unloaded blueprints.
- ///
- private bool allowHandling => skinEditor.State.Value == Visibility.Visible;
-
public override bool HandleRotation(float angle)
{
- if (!allowHandling)
- return false;
-
if (SelectedBlueprints.Count == 1)
{
// for single items, rotate around the origin rather than the selection centre.
@@ -63,9 +53,6 @@ namespace osu.Game.Skinning.Editor
public override bool HandleScale(Vector2 scale, Anchor anchor)
{
- if (!allowHandling)
- return false;
-
// convert scale to screen space
scale = ToScreenSpace(scale) - ToScreenSpace(Vector2.Zero);
@@ -143,9 +130,6 @@ namespace osu.Game.Skinning.Editor
public override bool HandleFlip(Direction direction, bool flipOverOrigin)
{
- if (!allowHandling)
- return false;
-
var selectionQuad = getSelectionQuad();
Vector2 scaleFactor = direction == Direction.Horizontal ? new Vector2(-1, 1) : new Vector2(1, -1);
@@ -166,9 +150,6 @@ namespace osu.Game.Skinning.Editor
public override bool HandleMovement(MoveSelectionEvent moveEvent)
{
- if (!allowHandling)
- return false;
-
foreach (var c in SelectedBlueprints)
{
var item = c.Item;