From: Agnelo Vaz Date: Mon, 21 Sep 2015 15:08:13 +0000 (+0100) Subject: IMF to be notified after Backspace key pressed X-Git-Tag: dali_1.1.4~13 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=7f64deaedcc2c548be923b3dd68ef25cf90b1405 IMF to be notified after Backspace key pressed * For prediction, the IMF needs to know if the backspace has resulted in the cursor being on a current word * If on a current word the IMF may decide that it becomes the current pre edit word. Change-Id: Ibf8e9afaba33ccce46ed90192357d89a20194d60 Signed-off-by: Agnelo Vaz --- diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp index a1283fb..3d22634 100644 --- a/dali-toolkit/internal/text/text-controller.cpp +++ b/dali-toolkit/internal/text/text-controller.cpp @@ -1817,6 +1817,7 @@ ImfManager::ImfCallbackData Controller::OnImfEvent( ImfManager& imfManager, cons case ImfManager::COMMIT: { InsertText( imfEvent.predictiveString, Text::Controller::COMMIT ); + update=true; requestRelayout = true; break; } @@ -1910,11 +1911,10 @@ bool Controller::BackspaceKeyEvent() if( removed ) { - // This is to reset the virtual keyboard to Upper-case - if( 0u == mImpl->mLogicalModel->mText.Count() ) - { - NotifyImfManager(); - } + DALI_LOG_INFO( gLogFilter, Debug::Verbose, "Controller::KeyEvent %p DALI_KEY_BACKSPACE RemovedText\n", this ); + // Notifiy the IMF manager after text changed + // Automatic Upper-case and restarting prediction on an existing word require this. + NotifyImfManager(); if( 0u != mImpl->mLogicalModel->mText.Count() || !mImpl->IsPlaceholderAvailable() )