Bug report #18963

Can not write a decimal in a real field of a layer spatialite

Added by Sophie Pébay Peyroula over 6 years ago. Updated over 6 years ago.

Status:Closed
Priority:High
Assignee:Alessandro Pasotti
Category:Edit widget
Affected QGIS version:3.0.2 Regression?:Yes
Operating System:Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:26794

Description

I am working on a spatialite database with layers with real fields.
In QGIS 2.18 they work perfectly, but in QGIS 3 impossible to manually enter decimal number(impossible to write a comma) whereas if i uses the calculator of fields with the fontion area, the result given is a decimal ...


Related issues

Duplicated by QGIS Application - Bug report #18679: Cannot insert decimal separator to field Closed 2018-04-10

History

#1 Updated by Jesahel Benoist over 6 years ago

Same issue here, but not only on spatialite, also on geopackage. The already existing data is not affected, and can be edited with comma or dot, but new data cannot be entered with decimal value, only integer. I have tried to change field type, and field size : after editing and saving, size appears as 0 in spatialite format, BUT already existing decimal data is still there (happily!). Please note that a similar bug (thread going nowhere, badly) has been signaled there : https://issues.qgis.org/issues/18679

#2 Updated by Jürgen Fischer over 6 years ago

#3 Updated by Jesahel Benoist over 6 years ago

A temporary solution is to choose the dot as decimal symbol instead of comma in Windows config panel (in french Région et langues/Formats/Paramètres supplémentaires/Nombres/Symbole décimal), before launching qgis.

#4 Updated by Regis Haubourg over 6 years ago

  • Status changed from Open to Feedback

Hi Sophie, could you share a minimalist SQL definition or spatialite file + a qgs project. I tested in both master W10 and Ubuntu and couldn't reproduce.

#5 Updated by Regis Haubourg over 6 years ago

  • Status changed from Feedback to Open

Ok, issue confirmed on Windows only.
The text widget is the faulty one.

The range widget works fine.
First issue, real field are not automatically assigned with a range widget.
Second issue, on windows, if you have a locale decimal set to comma (French here), you can type any dot or comma in a text widget if it applies to a real field. Kind of blocking stuff.

#6 Updated by Alessandro Pasotti over 6 years ago

  • Assignee set to Alessandro Pasotti

Confirmed, apparently windows only.

#7 Updated by Alessandro Pasotti over 6 years ago

  • Status changed from Open to In Progress

#8 Updated by Alessandro Pasotti over 6 years ago

  • Category changed from Data Provider/SpatiaLite to Edit widget

Windows users (in particular those with non-english locales): please test the snapshot and give me some feedback:

http://www.itopen.it/bulk/mxe-release-2018-06-05-18-06-30.zip

Unzip it somewhere and launch qgis.exe (no installation required, just delete the folder to uninstall, no python available)

What to test:
- real/floating point fields are displayed according to system settings ( comma or dot )
- real/floating point fields can be entered with comma or dot according to locale (both should be supported if using the default text widget)

#9 Updated by Alessandro Pasotti over 6 years ago

#10 Updated by Alessandro Pasotti over 6 years ago

#12 Updated by Alessandro Pasotti over 6 years ago

  • Resolution set to fixed/implemented
  • Status changed from In Progress to Closed

Fixed with https://github.com/qgis/QGIS/commit/4e37f381dee1e8a54144776c55bedbdf4df14b9b
please test it and report any issue assigning it to me

Also available in: Atom PDF