From 7c264643f6ed6da6a89ee369dbd9ef143f4222e7 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Wed, 8 Jun 2016 12:19:29 +0200 Subject: 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 --- src/widgets/widgets/qwidgetlinecontrol.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/widgets') diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp index 86903dc0c3..23d52b278d 100644 --- a/src/widgets/widgets/qwidgetlinecontrol.cpp +++ b/src/widgets/widgets/qwidgetlinecontrol.cpp @@ -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); } /*! -- cgit v1.2.3