PR above merged by @wmayer.
No I released https://github.com/FreeCAD/FreeCAD/pull/5232 that fixes the OP problem.
Bug: Wrong unit
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Re: Bug: Wrong unit
While testing the recent locale specific PRs I found a small regression caused by PR 5232.
To test create a QuantitySpinBox with no unit:
When you scroll up/down or use the up/down arrow buttons the value doesn't change. It is stuck at 0.000 (or -0.000).
When setting a unit
it starts to work. But when removing the unit again
it is stuck again.
When only reverting the changes made to QuantitySpinBox::stepBy() and leave the rest it works normally again.
git commit b330a83273
To test create a QuantitySpinBox with no unit:
Code: Select all
ui=Gui.UiLoader()
w=ui.createWidget("Gui::QuantitySpinBox")
w.show()
When setting a unit
Code: Select all
w.setProperty("unit", "m")
Code: Select all
w.setProperty("unit", "")
When only reverting the changes made to QuantitySpinBox::stepBy() and leave the rest it works normally again.
git commit b330a83273
Re: Bug: Wrong unit
Doing so you introduce a regression.wmayer wrote: ↑Sat Mar 26, 2022 5:22 pm When only reverting the changes made to QuantitySpinBox::stepBy() and leave the rest it works normally again.
git commit b330a83273
Take any QuantitySpinbox with Unit preference being "Standard".
* Manually enter value of "9999 mm"
* Step up value -> "10 000 mm" -> OK
* Step up value again -> "11 mm" -> Oups
I can have a look at this in coming days if you want. If you have time or prefer to do it by yourself, please let me know.
Re: Bug: Wrong unit
Confirmed.Doing so you introduce a regression.
Go ahead, please. I will be busy to look at some of the other bugs.I can have a look at this in coming days if you want. If you have time or prefer to do it by yourself, please let me know.