sync the current items after clicked()

This commit is contained in:
Marco Martin 2012-10-23 21:51:27 +02:00
parent f825a9f4a7
commit 18ed35d2d8

View File

@ -103,6 +103,13 @@ Item {
internal.tabBar.currentTab = root internal.tabBar.currentTab = root
internal.tabBar.forceActiveFocus() internal.tabBar.forceActiveFocus()
} }
onClicked: {
if (internal.tabGroup) {
internal.tabGroup.currentTab = tab
}
//TabBar is the granparent, done here too in case of no tabgroup
internal.tabBar.currentTab = root
}
onVisibleChanged: root.parent.childrenChanged() onVisibleChanged: root.parent.childrenChanged()
} }
@ -163,14 +170,7 @@ Item {
MouseArea { MouseArea {
id: mouseArea id: mouseArea
onClicked: { onClicked: root.clicked()
root.clicked()
if (internal.tabGroup) {
internal.tabGroup.currentTab = tab
}
//TabBar is the granparent, done here too in case of no tabgroup
internal.tabBar.currentTab = root
}
anchors.fill: parent anchors.fill: parent
} }