src/gui/widgets/qlinecontrol.cpp
changeset 19 fcece45ef507
parent 18 2f34d5167611
child 30 5dc02b23752f
--- a/src/gui/widgets/qlinecontrol.cpp	Fri Apr 16 15:50:13 2010 +0300
+++ b/src/gui/widgets/qlinecontrol.cpp	Mon May 03 13:17:34 2010 +0300
@@ -65,7 +65,7 @@
     Updates the display text based of the current edit text
     If the text has changed will emit displayTextChanged()
 */
-void QLineControl::updateDisplayText()
+void QLineControl::updateDisplayText(bool forceUpdate)
 {
     QString orig = m_textLayout.text();
     QString str;
@@ -102,7 +102,7 @@
     m_textLayout.endLayout();
     m_ascent = qRound(l.ascent());
 
-    if (str != orig)
+    if (str != orig || forceUpdate)
         emit displayTextChanged(str);
 }
 
@@ -476,7 +476,7 @@
         }
     }
     m_textLayout.setAdditionalFormats(formats);
-    updateDisplayText();
+    updateDisplayText(/*force*/ true);
     if (cursorPositionChanged)
         emitCursorPositionChanged();
     if (isGettingInput)