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.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()
}
@ -163,14 +170,7 @@ Item {
MouseArea {
id: mouseArea
onClicked: {
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
}
onClicked: root.clicked()
anchors.fill: parent
}