Merge pull request #7622 from rny/LabelTTF

fix LabelTTF::getBoundingBox() position error
This commit is contained in:
minggo 2014-08-06 14:33:28 +08:00
commit 6ee0c4171f
1 changed files with 2 additions and 1 deletions

View File

@ -280,7 +280,8 @@ const Size& LabelTTF::getContentSize() const
Rect LabelTTF::getBoundingBox() const Rect LabelTTF::getBoundingBox() const
{ {
return _renderLabel->getBoundingBox(); const_cast<LabelTTF*>(this)->setContentSize(_renderLabel->getContentSize());
return Node::getBoundingBox();
} }
#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) #if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1)))