mirror of
https://github.com/overte-org/overte.git
synced 2025-04-26 01:36:20 +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
|
||||
selection: ItemSelectionModel {
|
||||
id: selectionModel
|
||||
model: treeModel
|
||||
}
|
||||
|
||||
|
@ -215,6 +216,10 @@ TreeView {
|
|||
|
||||
onDoubleClicked: isExpanded(index) ? collapse(index) : expand(index)
|
||||
|
||||
onClicked: {
|
||||
selectionModel.setCurrentIndex(index, ItemSelectionModel.ClearAndSelect);
|
||||
}
|
||||
|
||||
onActivated: {
|
||||
var path = scriptsModel.data(index, 0x100)
|
||||
if (path) {
|
||||
|
|
Loading…
Reference in a new issue