Review Request: Fix for KoTextDocumentLayout hit test
"Matus Hanzes" <[email protected]> Tue, 16 Nov 2010 12:23:37 -0000
| Newsgroups | gmane.comp.kde.devel.koffice |
|---|---|
| Message-ID | <[email protected]> |
----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://svn.reviewboard.kde.org/r/5856/ ----------------------------------------------------------- Review request for KOffice. Summary ------- HitTest function in KoTextDocumentLayout is used to convert mouse pointer coordinate into index of character inside QTextDocument. Qt::ExactHit flag means that if mouse is not over some character the function should return -1. If the mouse is over some character function should return the position of character. Behavior is wrong when the mouse cursor is over QTextLine, but the text doesn't start from the beginning of the QTextLine. In this case HitText function returns index of first character in line instead of -1. To fix it it is needed to use QTextLine::naturalTextRectangle rect instead of QTextLine rect. Diffs ----- trunk/koffice/libs/kotext/KoTextDocumentLayout.cpp 1197331 Diff: http://svn.reviewboard.kde.org/r/5856/diff Testing ------- Thanks, Matus _______________________________________________ koffice-devel mailing list [email protected] https://mail.kde.org/mailman/listinfo/koffice-devel