1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 05:22:54 +08:00

Ensure DrawableStoryboardSprite's texture size propagates corectly on skin change

This commit is contained in:
Dean Herbert 2023-09-26 14:13:51 +09:00
parent 2ca1c684bb
commit 567bc8fcd3

View File

@ -104,7 +104,14 @@ namespace osu.Game.Storyboards.Drawables
Sprite.ApplyTransforms(this);
}
private void skinSourceChanged() => Texture = skin.GetTexture(Sprite.Path) ?? textureStore.Get(Sprite.Path);
private void skinSourceChanged()
{
// Setting texture will only update the size if it's zero.
// So let's force an update by setting to zero.
Size = Vector2.Zero;
Texture = skin.GetTexture(Sprite.Path) ?? textureStore.Get(Sprite.Path);
}
protected override void Dispose(bool isDisposing)
{