summaryrefslogtreecommitdiff
path: root/src/controls/TreeView.qml
diff options
context:
space:
mode:
authorFilippo Cucchetto <f.cucchetto@asem.it>2016-03-03 08:33:11 +0100
committerFilippo Cucchetto <filippocucchetto@gmail.com>2016-03-04 20:24:23 +0000
commit8c10fbf9c7907171b4bb1c2b72d17e90a0e59981 (patch)
treeebf668f55e6ef4f0a7d8d4ff6d80ec2ca1b8fb8a /src/controls/TreeView.qml
parent0f16932a88f9504e9e3de7cd5e88f6030119528c (diff)
downloadqtquickcontrols-8c10fbf9c7907171b4bb1c2b72d17e90a0e59981.tar.gz
StyleData "selected" should be false on invalid rows
When a row is -1 the __mouseArea.selected(row) function should return false. Without this change the styleData.selected property could be true with invalid rows. See BasicTableView.qml:555 where "itemSelected: __mouseArea.selected(rowIndex)" Change-Id: I535782446b4afb17f560bca75ec8c17b65f1bafe Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
Diffstat (limited to 'src/controls/TreeView.qml')
-rw-r--r--src/controls/TreeView.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/controls/TreeView.qml b/src/controls/TreeView.qml
index e152e810..1d2666db 100644
--- a/src/controls/TreeView.qml
+++ b/src/controls/TreeView.qml
@@ -210,6 +210,8 @@ BasicTableView {
if (selectionMode === SelectionMode.SingleSelection)
return selection.currentIndex === modelIndex
return selection.hasSelection && selection.isSelected(modelIndex)
+ } else {
+ return false
}
}