summaryrefslogtreecommitdiffstats
path: root/framework/qml/InlineAccountSwitcher.qml
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-25 13:59:18 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2017-04-25 13:59:18 +0200
commitc039ff7a80ff99d0265605f839154ac096824ff3 (patch)
tree4fe5764fc399703c72c496eaea1414b4d6dd3aaf /framework/qml/InlineAccountSwitcher.qml
parentd6d306186395fa45a52a3fbd124af8a67e8e6f8b (diff)
downloadkube-c039ff7a80ff99d0265605f839154ac096824ff3.tar.gz
kube-c039ff7a80ff99d0265605f839154ac096824ff3.zip
Autoselect the first account
Diffstat (limited to 'framework/qml/InlineAccountSwitcher.qml')
-rw-r--r--framework/qml/InlineAccountSwitcher.qml7
1 files changed, 7 insertions, 0 deletions
diff --git a/framework/qml/InlineAccountSwitcher.qml b/framework/qml/InlineAccountSwitcher.qml
index 15675ff6..d87dac9a 100644
--- a/framework/qml/InlineAccountSwitcher.qml
+++ b/framework/qml/InlineAccountSwitcher.qml
@@ -37,9 +37,16 @@ Rectangle {
37 37
38 Repeater { 38 Repeater {
39 model: accountsModel 39 model: accountsModel
40 onItemAdded: {
41 //Autoselect the first account to appear
42 if (!currentAccount) {
43 root.currentAccount = item.currentData.accountId
44 }
45 }
40 46
41 delegate: Item { 47 delegate: Item {
42 id: accountDelagte 48 id: accountDelagte
49 property variant currentData: model
43 50
44 height: Kube.Units.gridUnit 51 height: Kube.Units.gridUnit
45 width: root.width 52 width: root.width