--- a/src/hbwidgets/editors/hbabstractedit_p.cpp Fri Sep 17 08:32:10 2010 +0300
+++ b/src/hbwidgets/editors/hbabstractedit_p.cpp Mon Oct 04 00:38:12 2010 +0300
@@ -197,6 +197,8 @@
HbWidgetPrivate(),
doc(0),
placeholderDoc(0),
+ previousCursorAnchor(-1),
+ previousCursorPosition(-1),
validator(0),
imEditInProgress(false),
imPosition(0),
@@ -366,7 +368,6 @@
ensureCursorVisible();
- smileyEngineInstance()->setDocument(doc);
if(q->isSmileysEnabled()) {
smileyEngineInstance()->insertSmileys();
}
@@ -666,13 +667,13 @@
{
Q_Q(HbAbstractEdit);
- if (cursor.hasSelection()) {
+ if (cursor.hasSelection()) {
selectionControl = HbSelectionControl::attachEditor(q);
selectionControl->showHandles();
} else if (selectionControl){
selectionControl->hideHandles();
}
-
+
QTextCursor oldSelection(selectionCursor);
selectionCursor = cursor;
repaintOldAndNewSelection(oldSelection);
@@ -1049,6 +1050,9 @@
doc = newDoc;
cursor = QTextCursor(doc);
+ if(smileysEnabled) {
+ smileyEngineInstance()->setDocument(doc);
+ }
QObject::connect(doc, SIGNAL(contentsChanged()), q, SLOT(_q_contentsChanged()));
QObject::connect(doc, SIGNAL(contentsChange(int, int, int)), q, SLOT(_q_contentsChange(int, int, int)));