summaryrefslogtreecommitdiffstats
path: root/src/declarative/graphicsitems
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2011-03-02 05:53:48 (GMT)
committerAndrew den Exter <andrew.den-exter@nokia.com>2011-03-02 06:23:14 (GMT)
commit2123a7ff6a04aec331fada5e03aa99395a0de1db (patch)
tree6815f486e32f9783a35f7272077466dafe40fc64 /src/declarative/graphicsitems
parent7bc4222be9369463219656539d7f8085f426e576 (diff)
downloadQt-2123a7ff6a04aec331fada5e03aa99395a0de1db.zip
Qt-2123a7ff6a04aec331fada5e03aa99395a0de1db.tar.gz
Qt-2123a7ff6a04aec331fada5e03aa99395a0de1db.tar.bz2
Make the TextInput cursorRectangle relative to the item.
The rectangle returned was relative to the text and didn't adjust for horizontal scrolling. Change-Id: I09227d73bbd8b32d830744d5911d785246051c2f Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative/graphicsitems')
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index c873172..dc44bfe 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -482,6 +482,7 @@ QRect QDeclarativeTextInput::cursorRectangle() const
Q_D(const QDeclarativeTextInput);
QRect r = d->control->cursorRect();
r.setHeight(r.height()-1); // Make consistent with TextEdit (QLineControl inexplicably adds 1)
+ r.moveLeft(r.x() - d->hscroll);
return r;
}