From 4ed5872ba386a0d9f3b5f9bd5f41f934907bb54c Mon Sep 17 00:00:00 2001 From: Wenhai Lin Date: Mon, 15 Dec 2014 14:36:57 +0800 Subject: [PATCH] Fixed content size of Label is incorrect after sets empty string. --- cocos/2d/CCLabel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index b812d793d2..24365d63f1 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -583,6 +583,7 @@ void Label::alignText() { if (_fontAtlas == nullptr || _currentUTF16String.empty()) { + setContentSize(Size::ZERO); return; }