MouseArea {
anchors.fill: delegate
onClicked: {
+ var currentSourceDepth = delegate.ListView.view.model.sourceDepth
+
+ // here we remove everything in viewsModel after index "nextSourceDepth"
+ while(window.windowViewsModel.count>currentSourceDepth+1)
+ window.windowViewsModel.remove(window.windowViewsModel.count-1)
+
delegate.ListView.view.currentIndex = index
- window.currentCategoryIndex = index
- window.currentNewsIndex = -1
+ var path = listSourceModel[window.currentSourceIndex].currentPath
+ path[currentSourceDepth] = index
+ listSourceModel[window.currentSourceIndex].currentPath = path
+
+ window.windowViewsModel.append({ component: listSourceModel[window.currentSourceIndex].listViews[currentSourceDepth].viewComponent,
+ componentId: listSourceModel[window.currentSourceIndex].listViews[currentSourceDepth].viewId,
+ componentDepth: currentSourceDepth+1 })
}
}
}