fix(StatusEmojiAndColorComboBox): proper setting initial selection

This commit is contained in:
Michał Cieślak 2023-07-27 00:36:25 +02:00 committed by Michał
parent f1d2646fec
commit 720971c9db
1 changed files with 15 additions and 2 deletions

View File

@ -49,11 +49,24 @@ StatusComboBox {
*/
property int delegateHeight: 44
ModelChangeTracker {
id: modelTracker
model: root.model
}
QtObject {
id: d
readonly property string emoji: ModelUtils.get(root.model, currentIndex, "emoji") ?? ""
readonly property string color: ModelUtils.get(root.model, currentIndex, "color") ?? ""
readonly property string emoji: {
modelTracker.revision
return ModelUtils.get(root.model, currentIndex, "emoji") ?? ""
}
readonly property string color: {
modelTracker.revision
return ModelUtils.get(root.model, currentIndex, "color") ?? ""
}
}
control.textRole: "name"