Merge pull request #11359 from vladest/fix_runningscripts_selection

use selection model of TreeView
This commit is contained in:
Seth Alves 2017-09-14 11:22:08 -07:00 committed by GitHub
commit 10494cf3e0
2 changed files with 4 additions and 4 deletions

View file

@ -387,9 +387,9 @@ ScrollingWindow {
readOnly: true readOnly: true
Connections { Connections {
target: treeView target: treeView.selection
onCurrentIndexChanged: { onCurrentIndexChanged: {
var path = scriptsModel.data(treeView.currentIndex, 0x100) var path = scriptsModel.data(treeView.selection.currentIndex, 0x100)
if (path) { if (path) {
selectedScript.text = path selectedScript.text = path
} else { } else {

View file

@ -416,9 +416,9 @@ Rectangle {
readOnly: true readOnly: true
Connections { Connections {
target: treeView target: treeView.selection
onCurrentIndexChanged: { onCurrentIndexChanged: {
var path = scriptsModel.data(treeView.currentIndex, 0x100) var path = scriptsModel.data(treeView.selection.currentIndex, 0x100)
if (path) { if (path) {
selectedScript.text = path selectedScript.text = path
} else { } else {