Skip to content

Commit

Permalink
Add missing base calls for safety
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Jun 25, 2024
1 parent 2fda45c commit d722be1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions osu.Game.Tests/Visual/Editing/TestSceneComposeSelectBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ public override void Begin()

targetContainer = getTargetContainer();
initialRotation = targetContainer!.Rotation;

base.Begin();
}

public override void Update(float rotation, Vector2? origin = null)
Expand All @@ -102,6 +104,8 @@ public override void Commit()

targetContainer = null;
initialRotation = null;

base.Commit();
}
}

Expand Down
4 changes: 4 additions & 0 deletions osu.Game/Overlays/SkinEditor/SkinSelectionRotationHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public override void Begin()
originalRotations = objectsInRotation.ToDictionary(d => d, d => d.Rotation);
originalPositions = objectsInRotation.ToDictionary(d => d, d => d.ToScreenSpace(d.OriginPosition));
defaultOrigin = GeometryUtils.GetSurroundingQuad(objectsInRotation.SelectMany(d => d.ScreenSpaceDrawQuad.GetVertices().ToArray())).Centre;

base.Begin();
}

public override void Update(float rotation, Vector2? origin = null)
Expand Down Expand Up @@ -99,6 +101,8 @@ public override void Commit()
originalPositions = null;
originalRotations = null;
defaultOrigin = null;

base.Commit();
}
}
}

0 comments on commit d722be1

Please sign in to comment.