summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qpainter.cpp
diff options
context:
space:
mode:
authorZhang Hao <zhanghao@uniontech.com>2021-12-31 13:56:14 +0800
committerZhang Hao <zhanghao@uniontech.com>2022-02-10 03:37:18 +0000
commitbb67b6ff261bb24f99fa2b0e83a635e4f9f3e0c6 (patch)
tree94af126bb9e0d257ec092cb0234886c1eb32dc74 /src/gui/painting/qpainter.cpp
parentae7799a924c07f0f5de4e5c3321a87fe5bbafbb1 (diff)
Always update pressedPosition when drag was enabled
Since e02293a76d21e7077f1952d4ed8af6c6d1970190 and 2e0c29a4bbe2b3ae427137e65f179b0550dcf169 was committed, If a item width more than others,the selectionRect.x() always consist of currentStartSelection item's rect.center().x(),this will cause selectionRect size is not right. Because the code of 2e0c29a4bbe2b3ae427137e65f179b0550dcf169 is to fix the new bug introduced by e02293a76d21e7077f1952d4ed8af6c6d1970190, we need to use a better way to solve QTBUG-78797. When itemview enable drag,we need always update pressedPosition because pressedPosition was used to determine the drag distance, otherwise keep previous logic. Fixes: QTBUG-78797 Fixes: QTBUG-81542 Fixes: QTBUG-99512 Pick-to: 6.2 6.3 Change-Id: Ibc5020e35b0eb319e4b5546bdba39ff527c209a6 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
0 files changed, 0 insertions, 0 deletions