From dde96c63df85b7553c14f2f17e7afd3ea5ff34d7 Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Fri, 25 Nov 2016 14:33:26 +0800 Subject: [PATCH] fix label size --- native/cocos/2d/CCLabel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/native/cocos/2d/CCLabel.cpp b/native/cocos/2d/CCLabel.cpp index 5cee819560..adf3c18d9e 100644 --- a/native/cocos/2d/CCLabel.cpp +++ b/native/cocos/2d/CCLabel.cpp @@ -1251,9 +1251,10 @@ void Label::createSpriteForSystemFont(const FontDefinition& fontDef) auto newSize = _textSprite->getContentSize(); if(_overflow == Overflow::RESIZE_HEIGHT) { this->setContentSize(Size(_contentSize.width, newSize.height)); - } else if (_overflow == Overflow::NONE) { + } else { this->setContentSize(newSize); } + texture->release(); if (_blendFuncDirty) {