-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Locale support for extent and raster save as dlg #41316
Locale support for extent and raster save as dlg #41316
Conversation
CC @SrNetoChan , @agiudiceandrea @gioman Can you please check this out? Also test nodata and pyramids (no locale support on the latter) |
Hi @elpaso, the behavior now is not completely fixed. On Windows, with an Italian Locale it_IT (comma as decimal separator), it is now possible to enter both a comma or a point in the extent settings or in the Columns and Rows settings, but if a point is used it is not interpreted as a decimal separator but silently discarded: e.g. 100.5 is interpreted as 1005. I think that QgsDoubleValidator::toDouble should be used, instead of QLocale().toDouble(), to convert form the QLineEdit text to double value in order to correctly handle the number validated by QgsDoubleValidator. |
@elpaso, I don't know if it is related to this PR, but QGIS (mxe artifact build from this PR) crashes every time a layer is removed from the map if there is only one layer in the map. |
Co-authored-by: Andrea Giudiceandrea <andreaerdna@libero.it>
Probably unrelated. Thank you for the review btw! |
You are right, The offending PR is #41285 (comment). A patch was submitted right now #41319. |
@elpaso tested your PR on Ubuntu 18.04 Everything works as expected. There were also problems in the nodata options. If you used commas to set a nodata interval from 0 to 100,5 , the nodata option would be ignored and the raster was saved without setting those values to NODATA. In your PR it seems to be working. From this experience, I would say we should/could search for more QString::number and text().toDouble() in gui elements as they are probably causing problems somehow, no? |
Thanks for checking!
Definitely. |
unrelated test failure |
…raster-save-as Locale support for extent and raster save as dlg
Fixes #41284