Bug report #9259

SpatiaLite new column issue

Added by dr - over 10 years ago. Updated over 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:GUI
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:No Copied to github as #:17875

Description

1. Open any SpatiaLite file.
2. Toggle editing mode
3. Open attribute table and press "New column"
4. Choose any type of field: there are "Width" and "Precision" labels is presented, but not input fields.

spatialite.png (18.9 KB) dr -, 2013-12-28 01:55 AM

56.png (16.7 KB) dr -, 2014-01-04 05:13 AM


Related issues

Related to QGIS Application - Bug report #9325: Saving as Spatialite saves as SQLite that allows setting ... Closed 2014-01-13

Associated revisions

Revision 36d9d4bf
Added by Matthias Kuhn over 10 years ago

Add attribute dialog: Hide Length/Precision labels when unavailable
Fix #9259

History

#1 Updated by Matthias Kuhn over 10 years ago

  • Status changed from Open to Closed

#2 Updated by dr - over 10 years ago

  • Status changed from Closed to Reopened

In last master "width" and "precision" labels gone.

#3 Updated by Jukka Rahkonen over 10 years ago

SQLite does not really support (or has a limitation) to set column width and precision so hiding the controls feels like a right action.

#4 Updated by Matthias Kuhn over 10 years ago

  • Status changed from Reopened to Closed

Closing for the reasons outlined by Jukka.

#5 Updated by dr - over 10 years ago

  • Status changed from Closed to Reopened
  • File 56.png added

Ok, SQLite does not support width and precision. But now "New column" window looks ugly. What is the purpose of string which shows type of field (BLOB, TEXT, FLOAT, INTEGER) after input fields? Value of this string is the same as value of "Type" input field.

#6 Updated by Matthias Kuhn over 10 years ago

  • Tag set to easy

As far as I know, the values in the combobox are used equally throughout QGIS and the label below is used to tell the user the equivalent in the terminology used by the dataprovider.

Are you able to use QtDesigner? So you could easily solve this, by adding a vertical spacer below (to make the label "stick" to the upper part of the form) and maybe add Another label to the left saying something like "Provider type:", so the meaning of this value is clear.

#7 Updated by Matthias Kuhn over 10 years ago

  • Category changed from Data Provider/SpatiaLite to GUI

#8 Updated by Maxim Dubinin over 10 years ago

Let me add my 5c to the confusion.

Try to do this:
1. Load any shapefile with say 1 polygon
2. Right-click - save as Spatialite, check Add to canvas
3. After it is done (note possible bug #7822 btw), open table, start editing, try adding field (double). Note that both additional fields are present and editable.
This may be due to the fact that Metadata says SQLite, not SQLite with Spatialite. But I do select Spatialite on export.

Is it a separate issue?

#9 Updated by Matthias Kuhn over 10 years ago

Yes, this should be considered a separate issue: The layer OGR provider is used instead of the built-in spatialite provider. I am not aware of any reason to do this, it's probably just adding any "Save As" layer as OGR. Could you file another ticket for this? Thank you.

#10 Updated by Maxim Dubinin over 10 years ago

done #9325

#11 Updated by Alexander Bruy over 9 years ago

  • Resolution set to fixed/implemented
  • Status changed from Reopened to Closed

Closing, as original issue was fixed.

Also available in: Atom PDF