Re: Review Request: Fix for KoTextDocumentLayout hit test
"C. Boemann" <[email protected]> Wed, 17 Nov 2010 12:27:34 +0100
| Newsgroups | gmane.comp.kde.devel.koffice |
|---|---|
| Message-ID | <[email protected]> |
i guess, but matus please first fix the thing we discussed in essen and then we backport from there. It avoids merge conflicts On Wednesday 17 November 2010 12:23:34 Thomas Zander wrote: > > On 2010-11-16 14:25:39, Casper Boemann wrote: > > > please see the fix for this that i've already comited to essen > > Could that fix be committed in trunk? > > > - Thomas > > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://svn.reviewboard.kde.org/r/5856/#review8758 > ----------------------------------------------------------- > > 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