Merge pull request #10070 from liamcindy/Imageview_2.4

fix imageview render error
This commit is contained in:
minggo 2015-01-20 10:41:17 +08:00
commit a05fc8bc8e
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);