[ui] GraphEditor: attribute now loses focus when Enter or Escape is pressed

This commit is contained in:
Fabien Castan 2024-05-25 14:03:26 +02:00
parent 49c0d0feea
commit 02ab2ef931

View file

@ -215,6 +215,13 @@ RowLayout {
property bool memoryActiveFocus: false property bool memoryActiveFocus: false
onAccepted: { onAccepted: {
setTextFieldAttribute(text) setTextFieldAttribute(text)
parameterLabel.forceActiveFocus()
}
Keys.onPressed: (event)=> {
if ((event.key == Qt.Key_Escape)) {
event.accepted = true
parameterLabel.forceActiveFocus()
}
} }
Component.onDestruction: { Component.onDestruction: {
if (activeFocus) if (activeFocus)