diff options
author | Sami Merila <sami.merila@nokia.com> | 2010-09-09 08:59:03 (GMT) |
---|---|---|
committer | Sami Merila <sami.merila@nokia.com> | 2010-09-09 08:59:03 (GMT) |
commit | 647a3999bb073395ebb3df2137fb60e5b0435d16 (patch) | |
tree | dd1c00778261f61ba9888c77dd7c0e88e2456deb /src/gui/widgets | |
parent | 5342be5ceffc84b56476fff57dd7d5e1bbfeb471 (diff) | |
download | Qt-647a3999bb073395ebb3df2137fb60e5b0435d16.zip Qt-647a3999bb073395ebb3df2137fb60e5b0435d16.tar.gz Qt-647a3999bb073395ebb3df2137fb60e5b0435d16.tar.bz2 |
Cursor is misplaced in the editors text area
When QInputMethodEvent::Cursor with value 0 is sent to QLineEdit,
cursor is still visible.
QLineControl (text control widget inside QLineEdit) handles the
internal state of cursor visibility correctly and then promptly ignores
the state when drawing the text.
Issue is corrected by checking the cursor visibility state when drawing
the cursor into widget.
Task-number: QT-3670
Reviewed-by: axis
Diffstat (limited to 'src/gui/widgets')
-rw-r--r-- | src/gui/widgets/qlinecontrol.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index b6dfd13..4d47c82 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -527,7 +527,7 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl int cursor = m_cursor; if (m_preeditCursor != -1) cursor += m_preeditCursor; - if(!m_blinkPeriod || m_blinkStatus) + if (!m_hideCursor && (!m_blinkPeriod || m_blinkStatus)) m_textLayout.drawCursor(painter, offset, cursor, m_cursorWidth); } } |