mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 22:05:59 +08:00
Remove focus from TextField when incrementing/decrementing using buttons.
This fixes the issue where the value that was in the textfield before typing would be incremented instead, if the textField had active focus. CURA-8890
This commit is contained in:
parent
c6326eff64
commit
0b82e9ef31
@ -72,6 +72,18 @@ Item
|
||||
base.value = value * base.stepSize;
|
||||
}
|
||||
|
||||
// This forces TextField to commit typed values before incrementing with buttons.
|
||||
// This fixes the typed value not being incremented when the textField has active focus.
|
||||
up.onPressedChanged:
|
||||
{
|
||||
base.forceActiveFocus()
|
||||
}
|
||||
|
||||
down.onPressedChanged:
|
||||
{
|
||||
base.forceActiveFocus()
|
||||
}
|
||||
|
||||
background: Item {}
|
||||
|
||||
contentItem: Cura.TextField
|
||||
|
Loading…
x
Reference in New Issue
Block a user