Fixed a bug where IM reported wrong anchor rectangle

The problem was that in some cases, the cursor position was used to
calculate the anchor rectangle instead of the anchor position.

This caused selection handles to be shown at the wrong position.

Change-Id: I8d866b644fc3c4d530529b7f468d16ae1088cd98
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
bb10
Jan Arve Saether 2016-06-08 12:19:29 +02:00 committed by Jan Arve Sæther
parent 48fd845c61
commit 7c264643f6
1 changed files with 1 additions and 1 deletions

View File

@ -441,7 +441,7 @@ QRect QWidgetLineControl::anchorRect() const
{
if (!hasSelectedText())
return cursorRect();
return rectForPos(m_selstart < m_selend ? m_selstart : m_selend);
return rectForPos(m_cursor == m_selstart ? m_selend : m_selstart);
}
/*!