mirror of https://github.com/axmolengine/axmol.git
Merge pull request #10070 from liamcindy/Imageview_2.4
fix imageview render error
This commit is contained in:
commit
a05fc8bc8e
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue