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
parent
48fd845c61
commit
7c264643f6
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
|
|||
Loading…
Reference in New Issue