[3.0] Re-fix for text controller. 61/119061/1
authorVictor Cebollada <v.cebollada@samsung.com>
Wed, 15 Mar 2017 09:31:54 +0000 (09:31 +0000)
committerVictor Cebollada <v.cebollada@samsung.com>
Wed, 15 Mar 2017 09:31:54 +0000 (09:31 +0000)
Fixes the issue with the white space introduced by the previous patch.

Change-Id: Ia5f0b4a1638afa8ababff1a35f677f31f7fdbd42
Signed-off-by: Victor Cebollada <v.cebollada@samsung.com>
dali-toolkit/internal/text/text-controller.cpp

index b690366..ba53872 100644 (file)
@@ -1735,8 +1735,10 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent )
     int keyCode = keyEvent.keyCode;
     const std::string& keyString = keyEvent.keyPressed;
 
+    const bool isNullKey = ( 0 == keyCode ) && ( keyString.empty() );
+
     // Pre-process to separate modifying events from non-modifying input events.
-    if( 0 == keyCode )
+    if( isNullKey )
     {
       // In some platforms arrive key events with no key code.
       // Do nothing.
@@ -1808,7 +1810,7 @@ bool Controller::KeyEvent( const Dali::KeyEvent& keyEvent )
 
     if ( ( mImpl->mEventData->mState != EventData::INTERRUPTED ) &&
          ( mImpl->mEventData->mState != EventData::INACTIVE ) &&
-         ( 0 != keyCode ) &&
+         ( !isNullKey ) &&
          ( Dali::DALI_KEY_SHIFT_LEFT != keyCode ) &&
          ( Dali::DALI_KEY_VOLUME_UP != keyCode ) &&
          ( Dali::DALI_KEY_VOLUME_DOWN != keyCode ) )