mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:23:22 +08:00
Avoid potentially incorrect size adjustment when texture doesn't change
This commit is contained in:
parent
567bc8fcd3
commit
3705c4c8d5
@ -106,11 +106,11 @@ namespace osu.Game.Storyboards.Drawables
|
||||
|
||||
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);
|
||||
|
||||
// Setting texture will only update the size if it's zero.
|
||||
// So let's force an explicit update.
|
||||
Size = new Vector2(Texture.DisplayWidth, Texture.DisplayHeight);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
|
Loading…
Reference in New Issue
Block a user