From 2d0018b0b5570d1c1edd3919a9befcf34c62b873 Mon Sep 17 00:00:00 2001 From: Joni Poikelin Date: Wed, 13 Jan 2016 10:40:13 +0200 Subject: Fix dragging of TableView headers with invisible header columns Task-number: QTBUG-50416 Change-Id: Ic7aa92ed5dd3e6f47cb3986fe3965487b7edd48a Reviewed-by: J-P Nurmi --- src/controls/Private/BasicTableView.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controls/Private/BasicTableView.qml b/src/controls/Private/BasicTableView.qml index 66dec512..afec226d 100644 --- a/src/controls/Private/BasicTableView.qml +++ b/src/controls/Private/BasicTableView.qml @@ -677,7 +677,7 @@ ScrollView { onPositionChanged: { if (drag.active && modelData.movable && pressed && columnCount > 1) { // only do this while dragging for (var h = columnCount-1 ; h >= 0 ; --h) { - if (drag.target.x + headerRowDelegate.width/2 > headerRow.children[h].x) { + if (headerRow.children[h].visible && drag.target.x + headerRowDelegate.width/2 > headerRow.children[h].x) { repeater.targetIndex = h break } -- cgit v1.2.1