When getting active focus textinput value was being cleared. However if text was inputted then this would stay between active focus states.

This commit forces the value to be assigned the value in the textInput when active focus is given.

CURA-8640
This commit is contained in:
j.delarago 2022-04-04 10:38:09 +02:00
parent e20ded248f
commit e593322b43

View file

@ -162,6 +162,13 @@ SettingItem
property: "text"
value:
{
if (input.activeFocus)
{
// In QT6 using "when: !activeFocus" causes the value to be null when activeFocus becomes True
// Since we want the value to stay the same when giving focus to the TextInput this is being used
// in place of "when: !activeFocus"
return input.text
}
// Stacklevels
// 0: user -> unsaved change
// 1: quality changes -> saved change
@ -181,7 +188,6 @@ SettingItem
return propertyProvider.properties.value
}
}
when: !input.activeFocus
}
MouseArea