This commit is contained in:
Lynix
2018-07-15 16:46:34 +02:00
3 changed files with 35 additions and 2 deletions

View File

@@ -280,8 +280,10 @@ namespace Nz
else
{
material->SetDiffuseMap(std::move(texture));
if (resizeSprite && texture && texture->IsValid())
SetSize(Vector2f(Vector2ui(texture->GetSize())));
const TextureRef& newTexture = material->GetDiffuseMap();
if (resizeSprite && newTexture && newTexture->IsValid())
SetSize(Vector2f(Vector2ui(newTexture->GetSize())));
}
}