[4.0] Don't render text visual if the string is empty 70/166770/1
authorHeeyong Song <heeyong.song@samsung.com>
Wed, 27 Dec 2017 06:40:53 +0000 (15:40 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Fri, 12 Jan 2018 00:09:36 +0000 (09:09 +0900)
Change-Id: I88ad9e720501024e14a963ce73274ffde80f46f6

dali-toolkit/internal/visuals/text/text-visual.cpp

index dfc4a84..f652e16 100755 (executable)
@@ -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();