From c039ff7a80ff99d0265605f839154ac096824ff3 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Tue, 25 Apr 2017 13:59:18 +0200 Subject: Autoselect the first account --- framework/qml/InlineAccountSwitcher.qml | 7 +++++++ 1 file changed, 7 insertions(+) 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 { Repeater { model: accountsModel + onItemAdded: { + //Autoselect the first account to appear + if (!currentAccount) { + root.currentAccount = item.currentData.accountId + } + } delegate: Item { id: accountDelagte + property variant currentData: model height: Kube.Units.gridUnit width: root.width -- cgit v1.2.3