summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-04-04 20:16:18 +0200
committerChristian Ehrlicher <ch.ehrlicher@gmx.de>2019-04-09 18:53:59 +0000
commit37c24c6b1b65c2ff9808e5c2e2a18cf496e4a9db (patch)
tree11fa175f416e3a76c65046ea8ecd7205a4cd15cf /src
parent5f2afe18ccb0bbe258d4016ef65218cd3656cac2 (diff)
QTableView: fix Ctrl+End behavior with disabled columns
Ctrl+End moves the visual index to the bottom left index. This does not work correctly when the item in the bottom left is disabled. It should be fixed with 7863be311570fa219066df5fe8720d5b92ddb680 but does not due to a typo. Fix the typo by using the newly calculated visualColumn instead the initial column. There are cases where the algorithm still does not work as expected when there are more disabled items but fixing them would add a lot of complexity with no (much) gain. Fixes: QTBUG-72400 Change-Id: Ie90f6b3e41e00f54e826c2b4e7303e85ac1e4115 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/itemviews/qtableview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qtableview.cpp b/src/widgets/itemviews/qtableview.cpp
index 9c509583e6..e1280b250a 100644
--- a/src/widgets/itemviews/qtableview.cpp
+++ b/src/widgets/itemviews/qtableview.cpp
@@ -1870,7 +1870,7 @@ QModelIndex QTableView::moveCursor(CursorAction cursorAction, Qt::KeyboardModifi
visualColumn = d->nextActiveVisualColumn(visualRow, right, -1,
QTableViewPrivate::SearchDirection::Decreasing);
if (modifiers & Qt::ControlModifier)
- visualRow = d->nextActiveVisualRow(bottom, current.column(), -1,
+ visualRow = d->nextActiveVisualRow(bottom, visualColumn, -1,
QTableViewPrivate::SearchDirection::Decreasing);
break;
case MovePageUp: {