Merge "Fixed deletion of last character with no place-holder text" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 17 Jun 2015 09:35:29 +0000 (02:35 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Wed, 17 Jun 2015 09:35:30 +0000 (02:35 -0700)
dali-toolkit/internal/text/text-controller.cpp

index 589a018..23ade2b 100644 (file)
@@ -1143,14 +1143,15 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent )
 
       if( removed )
       {
-        if( 0u == mImpl->mLogicalModel->mText.Count() )
+        if( 0u != mImpl->mLogicalModel->mText.Count() ||
+            !mImpl->IsPlaceholderAvailable() )
         {
-          ShowPlaceholderText();
-          mImpl->mEventData->mUpdateCursorPosition = true;
+          mImpl->QueueModifyEvent( ModifyEvent::TEXT_DELETED );
         }
         else
         {
-          mImpl->QueueModifyEvent( ModifyEvent::TEXT_DELETED );
+          ShowPlaceholderText();
+          mImpl->mEventData->mUpdateCursorPosition = true;
         }
 
         textChanged = true;