mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-17 23:06:16 +00:00
QML UI: autocomplete objects should lose focus on selection
When the user makes a selection using the autocomplete function while editing a dive the keyboard should close and the selection list should disappear. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
This commit is contained in:
parent
9e9e06aed6
commit
97f1dc0b01
2 changed files with 6 additions and 1 deletions
|
@ -156,6 +156,7 @@ Item {
|
|||
Kirigami.Label {
|
||||
Layout.alignment: Qt.AlignRight
|
||||
text: qsTr("Air Temp:")
|
||||
font.pointSize: subsurfaceTheme.smallPointSize
|
||||
}
|
||||
TextField {
|
||||
id: txtAirTemp
|
||||
|
|
|
@ -15,6 +15,7 @@ TextField {
|
|||
textUpdateTimer.restart();
|
||||
}
|
||||
onFocusChanged: frame.shouldShow = focus
|
||||
|
||||
onVisibleChanged: {
|
||||
if (visible) {
|
||||
focus = false
|
||||
|
@ -27,6 +28,9 @@ TextField {
|
|||
Keys.onDownPressed: {
|
||||
hintsView.currentIndex++;
|
||||
}
|
||||
Keys.onReturnPressed: {
|
||||
focus = false
|
||||
}
|
||||
Timer {
|
||||
id: textUpdateTimer
|
||||
interval: 300
|
||||
|
@ -107,7 +111,7 @@ TextField {
|
|||
onClicked: {
|
||||
hintsView.currentIndex = index
|
||||
root.text = modelData
|
||||
frame.shouldShow = false;
|
||||
root.focus = false;
|
||||
}
|
||||
}
|
||||
ScrollBar.vertical: ScrollBar { }
|
||||
|
|
Loading…
Add table
Reference in a new issue