From 22978dbe84598e5b0dd4ba62ca7add0d08fa8bb7 Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Wed, 27 Dec 2017 15:40:53 +0900 Subject: [PATCH] [4.0] Don't render text visual if the string is empty Change-Id: I88ad9e720501024e14a963ce73274ffde80f46f6 --- dali-toolkit/internal/visuals/text/text-visual.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dali-toolkit/internal/visuals/text/text-visual.cpp b/dali-toolkit/internal/visuals/text/text-visual.cpp index dfc4a84..f652e16 100755 --- a/dali-toolkit/internal/visuals/text/text-visual.cpp +++ b/dali-toolkit/internal/visuals/text/text-visual.cpp @@ -644,7 +644,10 @@ void TextVisual::UpdateRenderer() animatableTextColor = control.GetProperty< Vector4 >( mAnimatableTextColorPropertyIndex ); } - if( ( fabsf( relayoutSize.width ) < Math::MACHINE_EPSILON_1000 ) || ( fabsf( relayoutSize.height ) < Math::MACHINE_EPSILON_1000 ) ) + std::string text; + mController->GetText( text ); + + if( ( fabsf( relayoutSize.width ) < Math::MACHINE_EPSILON_1000 ) || ( fabsf( relayoutSize.height ) < Math::MACHINE_EPSILON_1000 ) || text.empty() ) { // Removes the texture set. RemoveTextureSet(); -- 2.7.4