Merge pull request #8554 from newnon/v3_scale9sprite_capinets_fix

Scale9Sprite capInsets set fix
This commit is contained in:
minggo 2014-10-10 18:05:32 +08:00
commit 4a193c6d76
1 changed files with 1 additions and 1 deletions

View File

@ -828,7 +828,7 @@ y+=ytranslate; \
void Scale9Sprite::setSpriteFrame(SpriteFrame * spriteFrame, const Rect& capInsets)
{
Sprite * sprite = Sprite::createWithTexture(spriteFrame->getTexture());
this->updateWithSprite(sprite, spriteFrame->getRect(), spriteFrame->isRotated(), spriteFrame->getOffset(), spriteFrame->getOriginalSize(), Rect::ZERO);
this->updateWithSprite(sprite, spriteFrame->getRect(), spriteFrame->isRotated(), spriteFrame->getOffset(), spriteFrame->getOriginalSize(), capInsets);
// Reset insets
this->_insetLeft = capInsets.origin.x;