Item {
x: 0; y: 0
width: newsDetailRect.width
- height: column.height
+ height: column.height + 10
Column {
id: column
- x: 0; y: 0
+ x: 10; y: 10
width: parent.width - 20
Row {
Text {
id: detailText
text: htmlcontent; width: newsDetailRect.width - 20; wrapMode: Text.WordWrap
+ horizontalAlignment: Text.AlignJustify;
font.family: "Helvetica"
}
}
onClicked: {
var currentSourceDepth = currentSource.listModels[componentDepth-1].sourceDepth
- // here we remove everything in viewsModel after index "currentSourceDepth"
- while(window.windowViewsModel.count>currentSourceDepth+1)
- window.windowViewsModel.remove(window.windowViewsModel.count-1)
+ if (listSourceModel[window.currentSourceIndex].listViews.length >= currentSourceDepth+1)
+ {
+ // here we remove everything in viewsModel after index "currentSourceDepth"
+ while(window.windowViewsModel.count>currentSourceDepth+1)
+ window.windowViewsModel.remove(window.windowViewsModel.count-1)
- var path = listSourceModel[window.currentSourceIndex].currentPath
- path[currentSourceDepth] = index
- listSourceModel[window.currentSourceIndex].currentPath = path
+ var path = listSourceModel[window.currentSourceIndex].currentPath
+ path[currentSourceDepth] = index
+ listSourceModel[window.currentSourceIndex].currentPath = path.slice(0,currentSourceDepth+1)
- window.windowViewsModel.append({ component: listSourceModel[window.currentSourceIndex].listViews[currentSourceDepth].viewComponent,
- componentId: listSourceModel[window.currentSourceIndex].listViews[currentSourceDepth].viewId,
- componentDepth: currentSourceDepth+1 })
-
- window.windowViewsList.currentIndex = currentSourceDepth+1;
+ window.windowViewsModel.append({ component: listSourceModel[window.currentSourceIndex].listViews[currentSourceDepth].viewComponent,
+ componentDepth: currentSourceDepth+1 })
+ }
}
}
}