Commit a476b66f authored by Don Gagne's avatar Don Gagne

Escape - Cancel, Enter - Save support

parent ae8ea3bf
......@@ -59,6 +59,7 @@ QGCViewDialog {
validationError.text = fact.validate(validateValue, false /* convertOnly */)
forceSave.visible = true
}
valueField.forceActiveFocus();
}
Column {
......@@ -82,6 +83,14 @@ QGCViewDialog {
QGCTextField {
id: valueField
text: validate ? validateValue : fact.valueString
onAccepted: accept()
Keys.onReleased: {
if (event.key == Qt.Key_Escape) {
reject()
}
}
}
QGCLabel { text: fact.name }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment