1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 09:27:29 +08:00

Only store width/height of serialised drawable if it isn't automatically computed

This commit is contained in:
Bartłomiej Dach 2023-11-10 19:12:26 +09:00
parent ec2200d54f
commit b7acbde719
No known key found for this signature in database

View File

@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using osu.Framework.Bindables;
using osu.Framework.Extensions.EnumExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Logging;
@ -66,8 +67,13 @@ namespace osu.Game.Skinning
Position = component.Position;
Rotation = component.Rotation;
Scale = component.Scale;
Height = component.Height;
Width = component.Width;
if ((component as CompositeDrawable)?.AutoSizeAxes.HasFlagFast(Axes.X) != true)
Width = component.Width;
if ((component as CompositeDrawable)?.AutoSizeAxes.HasFlagFast(Axes.Y) != true)
Height = component.Height;
Anchor = component.Anchor;
Origin = component.Origin;