From 7f64deaedcc2c548be923b3dd68ef25cf90b1405 Mon Sep 17 00:00:00 2001 From: Agnelo Vaz Date: Mon, 21 Sep 2015 16:08:13 +0100 Subject: [PATCH] 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 --- dali-toolkit/internal/text/text-controller.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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() ) -- 2.7.4