Don't auto-focus disabled power level controls

This commit is contained in:
miruka 2020-07-18 20:25:30 -04:00
parent 1b5a09c052
commit 46c763fdfd

View File

@ -55,6 +55,11 @@ HListView {
width: root.width - x * 2 width: root.width - x * 2
spacing: theme.spacing * 1.5 spacing: theme.spacing * 1.5
Component.onCompleted:
powerLevel.enabled ?
powerLevel.item.forceActiveFocus() :
root.currentIndex = 0
HUserAvatar { HUserAvatar {
userId: member.id userId: member.id
displayName: member.display_name displayName: member.display_name
@ -214,8 +219,6 @@ HListView {
onAccepted: applyButton.clicked() onAccepted: applyButton.clicked()
onFieldFocusedChanged: onFieldFocusedChanged:
root.powerLevelFieldFocused = fieldFocused root.powerLevelFieldFocused = fieldFocused
Component.onCompleted: forceActiveFocus()
} }
} }