From: Paul Wisbey
Date: Mon, 19 Oct 2015 13:36:06 +0000 (+0100)
Subject: Append clipboard text after current pre-edit text
X-Git-Tag: dali_1.1.7~6^2
X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=f39a0555fc2897d94a4984712e219e452bc96d70
Append clipboard text after current pre-edit text
Issue description:
1) Configure keyboard to show clipboard item
2) Type some text without pressing space
3) Use the keyboard clipboard short-cut to paste test whilst pre-text is shown
4) Then when the next character is typed, the pre-edit text reappears
Solution is to stop prediction before pasting (appending instead of replacing)
Change-Id: Ibd661e2f4d377c8333711e97c3c7a751caf8c15f
---
diff --git a/dali-toolkit/internal/text/text-controller.cpp b/dali-toolkit/internal/text/text-controller.cpp
index bcac025..e990d42 100644
--- a/dali-toolkit/internal/text/text-controller.cpp
+++ b/dali-toolkit/internal/text/text-controller.cpp
@@ -1716,8 +1716,14 @@ void Controller::PasteText( const std::string& stringToPaste )
void Controller::PasteClipboardItemEvent()
{
+ // Retrieve the clipboard contents first
ClipboardEventNotifier notifier( ClipboardEventNotifier::Get() );
std::string stringToPaste( notifier.GetContent() );
+
+ // Commit the current pre-edit text; the contents of the clipboard should be appended
+ mImpl->ResetImfManager();
+
+ // Paste
PasteText( stringToPaste );
}