Merge "Avoid overwriting TEXT with PLACEHOLDER_TEXT" into tizen
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 22 May 2015 15:20:52 +0000 (08:20 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Fri, 22 May 2015 15:20:52 +0000 (08:20 -0700)
dali-toolkit/internal/text/text-controller.cpp

index 6400370..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();
+    }
   }
 }