Fixed deletion of last character with no place-holder text 11/41611/1
authorPaul Wisbey <p.wisbey@samsung.com>
Tue, 16 Jun 2015 17:28:18 +0000 (18:28 +0100)
committerPaul Wisbey <p.wisbey@samsung.com>
Tue, 16 Jun 2015 17:31:23 +0000 (18:31 +0100)
Change-Id: I3974b9118b990615b4b90874a1f8257de1f7cc36

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;