mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[ui] AttributeEditor: set attribute when edited TextField is destroyed
ensure attribute is correctly set when the AttributeItemDelegate is abruptly destroyed (e.g: when another node is selected)
This commit is contained in:
parent
c3464fa4e8
commit
754a4360a3
1 changed files with 8 additions and 0 deletions
|
@ -142,6 +142,10 @@ RowLayout {
|
|||
setTextFieldAttribute(text)
|
||||
root.forceActiveFocus()
|
||||
}
|
||||
Component.onDestruction: {
|
||||
if(activeFocus)
|
||||
setTextFieldAttribute(text)
|
||||
}
|
||||
DropArea {
|
||||
enabled: root.editable
|
||||
anchors.fill: parent
|
||||
|
@ -209,6 +213,10 @@ RowLayout {
|
|||
validator: attribute.type == "FloatParam" ? doubleValidator : intValidator
|
||||
onEditingFinished: setTextFieldAttribute(text)
|
||||
onAccepted: setTextFieldAttribute(text)
|
||||
Component.onDestruction: {
|
||||
if(activeFocus)
|
||||
setTextFieldAttribute(text)
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue