Avoid overwriting TEXT with PLACEHOLDER_TEXT
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / text-controller.cpp
index 8c3731a..adf4e75 100644 (file)
@@ -160,7 +160,12 @@ void Controller::SetPlaceholderText( PlaceholderType type, const std::string& te
       mImpl->mEventData->mPlaceholderTextActive = text;
     }
 
-    ShowPlaceholderText();
+    // Update placeholder if there is no text
+    if( mImpl->IsShowingPlaceholderText() ||
+        0u == mImpl->mLogicalModel->mText.Count() )
+    {
+      ShowPlaceholderText();
+    }
   }
 }
 
@@ -862,7 +867,7 @@ bool Controller::DoRelayout( const Size& size,
     layoutSize = mImpl->mVisualModel->GetActualSize();
   }
 
-  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "<--Controller::DoRelayout no glyphs, view updated %s\n", ( viewUpdated ? "true" : "false" ) );
+  DALI_LOG_INFO( gLogFilter, Debug::Verbose, "<--Controller::DoRelayout, view updated %s\n", ( viewUpdated ? "true" : "false" ) );
   return viewUpdated;
 }