Re: Review Request: Fix for KoTextDocumentLayout hit test
"Casper Boemann" <[email protected]> Tue, 16 Nov 2010 14:25:38 -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/#review8758 ----------------------------------------------------------- please see the fix for this that i've already comited to essen - Casper On 2010-11-16 12:23:36, Matus Hanzes wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://svn.reviewboard.kde.org/r/5856/ > ----------------------------------------------------------- > > (Updated 2010-11-16 12:23:36) > > > 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