Skip to content

Commit 90fd65b

Browse files
committed
qml: Give up focus on ValueInput when editing finished
This gives the focus back to the parent setting, relinquishing focus on the ValueInput and moving it out of the edit state.
1 parent ef26265 commit 90fd65b

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/qml/components/DeveloperOptions.qml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ ColumnLayout {
2929
actionItem: ValueInput {
3030
parentState: dbcacheSetting.state
3131
description: optionsModel.dbcacheSizeMiB
32-
onEditingFinished: optionsModel.dbcacheSizeMiB = parseInt(text)
32+
onEditingFinished: {
33+
optionsModel.dbcacheSizeMiB = parseInt(text)
34+
dbcacheSetting.forceActiveFocus()
35+
}
3336
}
3437
onClicked: loadedItem.forceActiveFocus()
3538
}
@@ -40,7 +43,10 @@ ColumnLayout {
4043
actionItem: ValueInput {
4144
parentState: parSetting.state
4245
description: optionsModel.scriptThreads
43-
onEditingFinished: optionsModel.scriptThreads = parseInt(text)
46+
onEditingFinished: {
47+
optionsModel.scriptThreads = parseInt(text)
48+
parSetting.forceActiveFocus()
49+
}
4450
}
4551
onClicked: loadedItem.forceActiveFocus()
4652
}

src/qml/components/StorageSettings.qml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ ColumnLayout {
2828
actionItem: ValueInput {
2929
parentState: pruneTargetSetting.state
3030
description: optionsModel.pruneSizeGB
31-
onEditingFinished: optionsModel.pruneSizeGB = parseInt(text)
31+
onEditingFinished: {
32+
optionsModel.pruneSizeGB = parseInt(text)
33+
pruneTargetSetting.forceActiveFocus()
34+
}
3235
}
3336
onClicked: loadedItem.forceActiveFocus()
3437
}

0 commit comments

Comments
 (0)