SMS app: Initialize the device combo when devices appear
Solves T8344
This commit is contained in:
parent
fdb03afb4d
commit
11071b4894
1 changed files with 4 additions and 1 deletions
|
@ -86,10 +86,13 @@ Kirigami.ScrollablePage
|
||||||
}
|
}
|
||||||
footer: ComboBox {
|
footer: ComboBox {
|
||||||
id: devicesCombo
|
id: devicesCombo
|
||||||
readonly property QtObject device: model.data(model.index(currentIndex, 0), DevicesModel.DeviceRole)
|
readonly property QtObject device: currentIndex>0 ? model.data(model.index(currentIndex, 0), DevicesModel.DeviceRole) : null
|
||||||
model: DevicesSortProxyModel {
|
model: DevicesSortProxyModel {
|
||||||
//TODO: make it possible to sort only if they can do sms
|
//TODO: make it possible to sort only if they can do sms
|
||||||
sourceModel: DevicesModel { displayFilter: DevicesModel.Paired | DevicesModel.Reachable }
|
sourceModel: DevicesModel { displayFilter: DevicesModel.Paired | DevicesModel.Reachable }
|
||||||
|
onRowsInserted: if (devicesCombo.currentIndex < 0) {
|
||||||
|
devicesCombo.currentIndex = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
textRole: "display"
|
textRole: "display"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue