mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-02 20:52:20 -07: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
1 changed files with 12 additions and 0 deletions
|
|
@ -72,6 +72,18 @@ Item
|
||||||
base.value = value * base.stepSize;
|
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 {}
|
background: Item {}
|
||||||
|
|
||||||
contentItem: Cura.TextField
|
contentItem: Cura.TextField
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue