Merge "Apply markup properties for pre-set text" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 13 Jul 2018 11:53:54 +0000 (11:53 +0000)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Fri, 13 Jul 2018 11:53:54 +0000 (11:53 +0000)
dali-toolkit/internal/text/text-controller.cpp

index 7192281..4ce4b5a 100755 (executable)
@@ -168,7 +168,14 @@ void Controller::SetGlyphType( TextAbstraction::GlyphType glyphType )
 
 void Controller::SetMarkupProcessorEnabled( bool enable )
 {
-  mImpl->mMarkupProcessorEnabled = enable;
+  if( enable != mImpl->mMarkupProcessorEnabled )
+  {
+    //If Text was already set, call the SetText again for enabling or disabling markup
+    mImpl->mMarkupProcessorEnabled = enable;
+    std::string text;
+    GetText( text );
+    SetText( text );
+  }
 }
 
 bool Controller::IsMarkupProcessorEnabled() const