Skip to content
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

Edit button is not updated when provider query makes a layer read-only #14294

Closed
qgib opened this issue Oct 6, 2011 · 8 comments
Closed

Edit button is not updated when provider query makes a layer read-only #14294

qgib opened this issue Oct 6, 2011 · 8 comments
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)

Comments

@qgib
Copy link
Contributor

qgib commented Oct 6, 2011

Author Name: Alister Hood (@AlisterH)
Original Redmine Issue: 4361
Affected QGIS version: master
Redmine category:vectors


Quoting from a mention in #13112:
As soon as you place a query on a shapefile, it's capabilities drop from 975 to 704, which raises "Provider cannot be opened for editing".

Creating a query also creates an inconsistency in the UI:

Whilst the editing pen is still blue in the toolbar, it's already greyed out in the attributes table. Clicking the pen in the toolbar raises aforementioned error and stalls it in grey. Removing the query doesn't solve this issue. Opening the attributes table again, the pen is blue there.

So it seems, the toolbar's symbol is not up to date.

975 and 704 equal:

[[PyQt]]4.QtCore.QString(u'Add Features, Delete Features, Change Attribute Values, Add Attributes, Create Spatial Index, Fast Access to Features at ID, Change Geometries')

and  

[[PyQt]]4.QtCore.QString(u'Create Spatial Index, Fast Access to Features at ID')

===================

That description isn't completely accurate - the button isn't "already" greyed out in the attribute table. If you open the attribute table after the query is set, then it will be greyed out. If you open it after the query is removed, it will not be greyed out. The button doesn't update in an attribute table that is already open.

Also note:

  • If a provider doesn't support attribute updates (e.g. the attached example vrt using a csv file), then the edit button will always be greyed out in the attribute table. So if you set a query on the layer, then try to enable editing, the button will grey out, and to be able to edit the layer you will need to remove the query and either save and reopen the project, or remove the layer and add it again.
  • The error message when you try to enable editing with a query set doesn't actually identify the problem, so most users probably wouldn't know how to deal with it:
Provider cannot be opened for editing

@qgib
Copy link
Contributor Author

qgib commented Oct 6, 2011

Author Name: Alister Hood (@AlisterH)


example vrt


  • 3460 was configured as test.csv
  • 3461 was configured as test.ovf

@qgib
Copy link
Contributor Author

qgib commented Oct 6, 2011

Author Name: Jürgen Fischer (@jef-n)


  • priority_id was changed from Normal to Low

@qgib
Copy link
Contributor Author

qgib commented Dec 16, 2011

Author Name: Giovanni Manghi (@gioman)


  • fixed_version_id was configured as Version 1.7.4

@qgib
Copy link
Contributor Author

qgib commented Apr 16, 2012

Author Name: Paolo Cavallini (@pcav)


  • crashes_corrupts_data was configured as 0
  • version was configured as master
  • fixed_version_id was changed from Version 1.7.4 to Version 1.8.0

@qgib
Copy link
Contributor Author

qgib commented Sep 4, 2012

Author Name: Paolo Cavallini (@pcav)


  • fixed_version_id was changed from Version 1.8.0 to Version 2.0.0

@qgib
Copy link
Contributor Author

qgib commented Jun 28, 2014

Author Name: Jürgen Fischer (@jef-n)


  • fixed_version_id was changed from Version 2.0.0 to Future Release - Lower Priority

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0
  • regression was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


End of life notice: QGIS 2.18 LTR
*
Source:*
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/


  • status_id was changed from Open to Closed
  • resolution was changed from to end of life

@qgib qgib closed this as completed Mar 9, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats) labels May 24, 2019
@qgib qgib added this to the Future Release - Lower Priority milestone May 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Vectors Related to general vector layer handling (not specific data formats)
Projects
None yet
Development

No branches or pull requests

1 participant