Port away from Controller::activeConnectionIndex
This commit is contained in:
committed by
Joshua Goins
parent
e9e1e223f7
commit
6ba2b715c3
@@ -160,8 +160,6 @@ RowLayout {
|
||||
id: accounts
|
||||
implicitHeight: contentHeight
|
||||
|
||||
currentIndex: Controller.activeConnectionIndex
|
||||
|
||||
header: Kirigami.Separator {}
|
||||
|
||||
footer: Delegates.RoundedItemDelegate {
|
||||
@@ -227,6 +225,15 @@ RowLayout {
|
||||
}
|
||||
}
|
||||
|
||||
onVisibleChanged: {
|
||||
for (let i = 0; i < accounts.count; i++) {
|
||||
if (model.data(model.index(i, 0), Qt.DisplayRole) === root.connection.localUser.id) {
|
||||
accounts.currentIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
delegate: Delegates.RoundedItemDelegate {
|
||||
id: userDelegate
|
||||
|
||||
|
||||
Reference in New Issue
Block a user