mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-11 19:58:19 +02:00
fix selection issue for TreeView.qml
This commit is contained in:
parent
9af6f2683a
commit
99617600c4
1 changed files with 5 additions and 0 deletions
|
@ -27,6 +27,7 @@ TreeView {
|
||||||
|
|
||||||
model: treeModel
|
model: treeModel
|
||||||
selection: ItemSelectionModel {
|
selection: ItemSelectionModel {
|
||||||
|
id: selectionModel
|
||||||
model: treeModel
|
model: treeModel
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,6 +216,10 @@ TreeView {
|
||||||
|
|
||||||
onDoubleClicked: isExpanded(index) ? collapse(index) : expand(index)
|
onDoubleClicked: isExpanded(index) ? collapse(index) : expand(index)
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
selectionModel.setCurrentIndex(index, ItemSelectionModel.ClearAndSelect);
|
||||||
|
}
|
||||||
|
|
||||||
onActivated: {
|
onActivated: {
|
||||||
var path = scriptsModel.data(index, 0x100)
|
var path = scriptsModel.data(index, 0x100)
|
||||||
if (path) {
|
if (path) {
|
||||||
|
|
Loading…
Reference in a new issue