src/gui/widgets/qlineedit_p.cpp
branchRCL_3
changeset 8 3f74d0d4af4c
parent 4 3b1da2848fc7
--- a/src/gui/widgets/qlineedit_p.cpp	Mon Mar 15 12:43:09 2010 +0200
+++ b/src/gui/widgets/qlineedit_p.cpp	Thu Apr 08 14:19:33 2010 +0300
@@ -129,12 +129,12 @@
 void QLineEditPrivate::_q_selectionChanged()
 {
     Q_Q(QLineEdit);
-    if (control->preeditAreaText().isEmpty()) {
+    if (!control->text().isEmpty() && control->preeditAreaText().isEmpty()) {
         QStyleOptionFrameV2 opt;
         q->initStyleOption(&opt);
         bool showCursor = control->hasSelectedText() ?
                           q->style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, q):
-                          true;
+                          q->hasFocus();
         setCursorVisible(showCursor);
     }