mirror of https://github.com/ppy/osu
Avoid potentially incorrect size adjustment when texture doesn't change
This commit is contained in:
parent
567bc8fcd3
commit
3705c4c8d5
|
@ -106,11 +106,11 @@ private void load(Storyboard storyboard)
|
|||
|
||||
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