Open PedroVenancio opened 4 years ago
Step works as expected if "Allow NULL" is unchecked.
Actually it also works with "Allow NULL" checked. And this clearly visible in the screencast: each step increments by 0.5 which is a step value configured for this field. Also this can be verified by entering any value manually and then using up/down buttons to increase or decrease number.
Hi @alexbruy
So the expected behaviour is, when Allow NULL is checked, it count also de zero ("0.0")?
For instance, if the minimum is 0 and the Allow NULL is checked and the step defined as 0.5, it counts: 0.0 ... 0.1 ... 0.2 ... 0.3 ... 0.4 ?
I can understand it, but it does not seem very intuitive, because my understanding of Allow NULL in this context was only to give the opportunity to the user to leave the field without be filled with any value. Imagine in my use case. That field should store the air temperature (degrees celsius, ºC). If I uncheck the Allow NULL, it uses 0.0 as default, but 0.0ºC is a valid temperature value (unlike for instance precipitation), and it will break all subsequent data analysis. This makes sense?
We don't use 0 (zero) as NULL. For NULL used special value, which in this case (if I read code correctly) is min - step
. So if I understand initial issue, problem appears when widget has NULL value by default (for example new feature was digitized) and clicking on the up arrow produces wrong result.
So if I understand initial issue, problem appears when widget has NULL value by default (for example new feature was digitized) and clicking on the up arrow produces wrong result.
Exactly @alexbruy
Still an issue on QGIS 3.22.3.
@Pedro-Murteira you are doing an amazing job in checking all old issues!!! Thank you!
@elpaso thank you very much! I'm glad to be helping QGIS!
still an issue in QGIS 3.24.1
I can confirm, its still an issue in QGIS 3.34. / the connection to "Allow NULL"-checkbox is not very intuitive
Unfortunately changing the "Allow NULL"-checkbox is not allowed (greyed out) when using "Range-Slider" or "Range-Dial" instead of "Range-Editable": As a workaround you have to change to "Range-Editable", then adjust "Allow NULL"-checkbox and then change back to "Range-Slider" or "Range-Dial" -setting.
my intuitive thought was that using a slider with step "10" will allow only "0,10,20,30..."-values.
But it is sliding in "1"-steps when moving the slider-button by mouse. Only when clicking on the slider-line beneath the silder-button there are "10"-steps (but the will end up for example in 14,24,34,..., when silder is set to 4 first)
When exporting the project to QFIELD and using the slider there, the slider works als expected: Just in 10-steps by using the slider-button or by clicking on the line.
It will be nice, when QGIS will work in the same way the developers of QFIELD imagined.
Describe the bug The step/increment in Range Widget is wrong, when "Allow NULL" is selected. Please see the screencast:
The "Allow NULL" option seems to have some issues: https://github.com/qgis/QGIS/issues/31245
How to Reproduce
Open this project: range_widget.zip
Test like in the screencast.
QGIS and OS versions
Additional context