fix imageview render error

This commit is contained in:
Liam 2015-01-19 17:00:53 +08:00
parent a456a3b917
commit 987bfd4831
1 changed files with 2 additions and 1 deletions

View File

@ -256,10 +256,11 @@ void ImageView::imageTextureScaleChangedWithSize()
if (_scale9Enabled)
{
_imageRenderer->setPreferredSize(_contentSize);
_imageRenderer->setScale(1.0f);
}
else
{
Size textureSize = _imageRenderer->getContentSize();
Size textureSize = _imageTextureSize;
if (textureSize.width <= 0.0f || textureSize.height <= 0.0f)
{
_imageRenderer->setScale(1.0f);