diff options
Diffstat (limited to 'framework/qml/InlineAccountSwitcher.qml')
-rw-r--r-- | framework/qml/InlineAccountSwitcher.qml | 7 |
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 |